成功解決gyp verb ensuring that file exists: C:\Python27\python.exe gyp ERR! configure error gyp ERR! sta


解決問題

gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "F:\Program Files\Python\Python36\python.EXE", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\node-gyp\lib\configure.js:483:19)
gyp ERR! stack at PythonFinder.<anonymous> (G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\node-gyp\lib\configure.js:508:16)
gyp ERR! stack at G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:158:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "F:\\Program Files (x86)\\node-v10.5.0\\node.exe" "G:\\USST\\Jason niu tutor\\FXTrafficSystem-web\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd G:\USST\Jason niu tutor\FXTrafficSystem-web\node_modules\node-sass
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN sass-loader@6.0.6 requires a peer of webpack@^2.0.0 || >= 3.0.0-rc.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN The package express is included as both a dev and production dependency.
npm WARN The package jquery is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.5.3 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\99386\AppData\Roaming\npm-cache\_logs\2018-07-16T13_26_26_530Z-debug.log
 

解決方法

      切記,因為我電腦上已經安裝由python3.6了。環境要求python2的版本,具體為什么不用python3,我特么也納悶,也不太清為什么必須是python2,python3版本就是不行,所以,還是重新安裝python2吧……

兩種方法搞定!
T1、npm install --global --production windows-build-tools
T2、自行下載
npm install --python=python2.7     #先下載
npm config set python python2.7   #再設置環境

 

---------------------
作者:一個處女座的程序猿
來源:CSDN
原文:https://blog.csdn.net/qq_41185868/article/details/81073295
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM