歡迎您的來訪!有源碼,好建站(m.bmm520.net)源碼海洋源碼網(wǎng)為您提供快速建站平臺(tái).

      npm install 報(bào)錯(cuò) check python checking for Python executable python2 in the PATH

      時(shí)間:2023-02-14 21:37來源:未知 作者:admin 點(diǎn)擊:
      當(dāng)npm install 的時(shí)候,報(bào)如下錯(cuò)誤: Building: G:\nodejs\node.exe F:\test\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gy

       當(dāng)npm install 的時(shí)候,報(bào)如下錯(cuò)誤:

      Building: G:\nodejs\node.exe F:\test\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=

      gyp info it worked if it ends with ok

      gyp verb cli [

      gyp verb cli   'G:\\nodejs\\node.exe',

      gyp verb cli   'F:\\test\\node_modules\\node-gyp\\bin\\node-gyp.js',

      gyp verb cli   'rebuild',

      gyp verb cli   '--verbose',

      gyp verb cli   '--libsass_ext=',

      gyp verb cli   '--libsass_cflags=',

      gyp verb cli   '--libsass_ldflags=',

      gyp verb cli   '--libsass_library='

      gyp verb cli ]

      gyp info using node-gyp@3.8.0

      gyp info using node@12.13.0 | win32 | x64

      gyp verb command rebuild []

      gyp verb command clean []

      gyp verb clean removing "build" directory

      gyp verb command configure []

      gyp verb check python checking for Python executable "python2" in the PATH

      gyp verb `which` failed Error: not found: python2

      gyp verb `which` failed     at getNotFoundError (F:\test\node_modules\which\which.js:13:12)

      gyp verb `which` failed     at F (F:\test\node_modules\which\which.js:68:19)

      gyp verb `which` failed     at E (F:\test\node_modules\which\which.js:80:29)

      gyp verb `which` failed     at F:\test\node_modules\which\which.js:89:16

      gyp verb `which` failed     at F:\test\node_modules\isexe\index.js:42:5

      gyp verb `which` failed     at F:\test\node_modules\isexe\windows.js:36:5

      gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21)

      gyp verb `which` failed  python2 Error: not found: python2

      gyp verb `which` failed     at getNotFoundError (F:\test\node_modules\which\which.js:13:12)

      gyp verb `which` failed     at F (F:\test\node_modules\which\which.js:68:19)

      gyp verb `which` failed     at E (F:\test\node_modules\which\which.js:80:29)

      gyp verb `which` failed     at F:\test\node_modules\which\which.js:89:16

      gyp verb `which` failed     at F:\test\node_modules\isexe\index.js:42:5

      gyp verb `which` failed     at F:\test\node_modules\isexe\windows.js:36:5

      gyp verb `which` failed     at FSReqCallback.oncomplete (fs.js:158:21) {

      gyp verb `which` failed   stack: 'Error: not found: python2\n' +

      gyp verb `which` failed     '    at getNotFoundError (F:\\test\\node_modules\\which\\which.js:13:12)\n' +

      gyp verb `which` failed     '    at F (F:\\test\\node_modules\\which\\which.js:68:19)\n' +

      gyp verb `which` failed     '    at E (F:\\test\\node_modules\\which\\which.js:80:29)\n' +

      gyp verb `which` failed     '    at F:\\test\\node_modules\\which\\which.js:89:16\n' +

      gyp verb `which` failed     '    at F:\\test\\node_modules\\isexe\\index.js:42:5\n' +

      gyp verb `which` failed     '    at F:\\test\\node_modules\\isexe\\windows.js:36:5\n' +

      gyp verb `which` failed     '    at FSReqCallback.oncomplete (fs.js:158:21)',

      gyp verb `which` failed   code: 'ENOENT'

      gyp verb `which` failed }

      gyp verb check python checking for Python executable "python" in the PATH

      gyp verb `which` succeeded python G:\Python\Python37-32\python.EXE

      gyp ERR! configure error

      gyp ERR! stack Error: Command failed: G:\Python\Python37-32\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];

      gyp ERR! stack   File "<string>", line 1

      gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];

      gyp ERR! stack                                ^

      gyp ERR! stack SyntaxError: invalid syntax

      gyp ERR! stack

      gyp ERR! stack     at ChildProcess.exithandler (child_process.js:295:12)

      gyp ERR! stack     at ChildProcess.emit (events.js:210:5)

      gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)

      gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

      gyp ERR! System Windows_NT 10.0.18362

      gyp ERR! command "G:\\nodejs\\node.exe" "F:\\test\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsas

      s_library="

      gyp ERR! cwd F:\test\node_modules\node-sass

      gyp ERR! node -v v12.13.0

      gyp ERR! node-gyp -v v3.8.0

      gyp ERR! not ok

      Build failed with error code: 1

      npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.

      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):

      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

       

      npm ERR! code ELIFECYCLE

      npm ERR! errno 1

      npm ERR! node-sass@4.11.0 postinstall: `node scripts/build.js`

      npm ERR! Exit status 1

      npm ERR!

      npm ERR! Failed at the node-sass@4.11.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!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2019-11-18T07_33_10_767Z-debug.log

       

       

      Process finished with exit code 1

      解決辦法:
       
      運(yùn)行 npm install --global windows-build-tools --save
      再安裝node-sass npm install node-sass --save
      到這里,錯(cuò)誤應(yīng)該就已經(jīng)解決了。
      如果 node-sass 安裝不上的話可以試試用 cnpm 鏡像安裝。
       
      (責(zé)任編輯:admin)本文地址:http://m.bmm520.net/info/wangzhankaifaqianhouduan/2023/0214/23493.html

      推薦資訊

      亚洲国产韩国一区二区| 亚洲免费在线观看| 亚洲精品亚洲人成在线观看下载| 亚洲无人区码一二三码区别图片| 亚洲乱码一二三四区麻豆| 亚洲系列国产精品制服丝袜第| 久久精品国产亚洲AV大全| 亚洲国产高清视频| 亚洲国产综合91精品麻豆| 亚洲国产精品久久久久网站| 亚洲短视频男人的影院| 666精品国产精品亚洲| 亚洲一区中文字幕久久| 亚洲综合一区二区| 亚洲免费一级视频| 国产亚洲福利在线视频| 亚洲免费综合色在线视频| 亚洲午夜成人精品无码色欲| 亚洲国产精品成人午夜在线观看| 亚洲精品国产高清在线观看| 亚洲AV日韩AV永久无码色欲| 在线91精品亚洲网站精品成人| www.91亚洲| 国产亚洲成人久久| 亚洲精品无码午夜福利中文字幕| 久久精品国产精品亚洲精品| 久久亚洲精品国产精品黑人| 91情国产l精品国产亚洲区| 亚洲国产日韩在线一区| 在线综合亚洲欧洲综合网站| 亚洲国产成人手机在线观看| 亚洲成aⅴ人片久青草影院| 亚洲伊人成无码综合网| 国产精品亚洲аv无码播放| 亚洲人成电影福利在线播放| 亚洲国产精品人久久电影| 亚洲色欲啪啪久久WWW综合网| 久久久久久久久无码精品亚洲日韩| 亚洲国产成人精品91久久久| 91麻豆精品国产自产在线观看亚洲| 国产精品亚洲аv无码播放|