configure errorgyp ERR stack Error: Can‘t find Python executable 以及npm ERR code ELIFECYCLE
在执行npm install命令时,出现两处错误:gyp ERR! configure errorgyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.gyp ERR! stackat PythonFinder.failNoPython (E:\Idea
·
在执行npm install命令时,出现两处错误:
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python2.7", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (E:\IdeaProjects\edu\front\vue-element-admin-master\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (E:\IdeaProjects\edu\front\vue-element-admin-master\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at callback (E:\IdeaProjects\edu\front\vue-element-admin-master\node_modules\graceful-fs\polyfills.js:306:20)
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Windows_NT 10.0.19044
gyp ERR! command "E:\\node.js\\node.exe" "E:\\IdeaProjects\\edu\\front\\vue-element-admin-master\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:\IdeaProjects\edu\front\vue-element-admin-master\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\dell\AppData\Roaming\npm-cache\_logs\2022-04-10T16_23_29_217Z-debug.log
百度了挺多方法都没有解决问题,最后还是让我找到了,最后使用以下命令解决了问题:
//设置全局镜像源:
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
Node版本是v10.14.2,npm版本是对应的6.4.1版本
更多推荐
已为社区贡献1条内容
所有评论(0)