之前安装失败,再安装就不去下载了,怎么办呢?那就先卸载再安装:
npm uninstall node-sass
npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
相关错误提示
提示没有安装python、build失败等,如:
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:UserszhuonAppDataLocalProgramsPythonPython36python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (G:WorkspaceManYanmanyan-navnode_modulesnode-gyplibconfigure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (G:WorkspaceManYanmanyan-navnode_modulesnode-gyplibconfigure.js:508:16)
gyp ERR! stack at G:WorkspaceManYanmanyan-navnode_modulesgraceful-fspolyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.15063
gyp ERR! command "C:devnodejsnode.exe" "G:WorkspaceManYanmanyan-navnode_modulesnode-gypbinnode-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags="
"--libsass_library="
gyp ERR! cwd G:WorkspaceManYanmanyan-navnode_modulesnode-sass
gyp ERR! node -v v8.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed
npm WARN co-mocha@1.2.0 requires a peer of mocha@>=1.18 <4 but none was installed.
npm WARN egg-restapi-module-tool@1.0.0 No repository field.
npm WARN egg-restapi-module-tool@1.0.0 scripts['server'] should probably be scripts['start'].npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.8.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.8.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:nodejscache_logs2017-09-02T16_06_24_298Z-debug.log









