npm install时报如下错误:
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (D:\学习\微服务项目\my\guiliedu-web\vue-element-admin\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (D:\学习\微服务项目\my\guiliedu-web\vue-element-admin\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at callback (D:\学习\微服务项目\my\guiliedu-web\vue-element-admin\node_modules\graceful-fs\polyfills.js:295:20)
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "D:\\学习\\node\\node.exe" "D:\\学习\\微服务项目\\my\\guiliedu-web\\vue-element-admin\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\学习\微服务项目\my\guiliedu-web\vue-element-admin\node_modules\node-sass
gyp ERR! node -v v10.14.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.14.1 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! C:\Users\71824\AppData\Roaming\npm-cache\_logs\2020-07-13T14_49_33_499Z-debug.log
PS D:\学习\微服务项目\my\guiliedu-web\vue-element-admin> npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
提示没有python?????什么鬼
所以我也是找了很久的方法
终于!
因为node-sass报错
npm ERR! node-sass@4.14.1 postinstall: node scripts/build.js
解决方案:
输入如下命令
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
重新 npm install
没有报错!解决!