網站首頁 編程語言 正文
npm install 報錯 gyp info it worked if it ends with ok npm ERR! gyp verb cli [
作者:qcc0716 更新時間: 2022-01-11 編程語言今天新啟動一個項目,在 npm install 安裝依賴項時出現報錯。
ERR! code 1
npm ERR! path C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\Administrator\\Desktop\\14531\\mall-admin-web\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@14.16.0 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\graceful-fs\polyfills.js:284:29
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19041
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\Desktop\\14531\\mall-admin-web\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-sass
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-04-06T07_35_56_176Z-debug.log
PS C:\Users\Administrator\Desktop\14531\mall-admin-web> npm install npm -g
removed 218 packages, and changed 3 packages in 7s
PS C:\Users\Administrator\Desktop\14531\mall-admin-web> npm install
npm ERR! code 1
npm ERR! path C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm ERR! gyp verb cli 'C:\\Users\\Administrator\\Desktop\\14531\\mall-admin-web\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm ERR! gyp verb cli 'rebuild',
npm ERR! gyp verb cli '--verbose',
npm ERR! gyp verb cli '--libsass_ext=',
npm ERR! gyp verb cli '--libsass_cflags=',
npm ERR! gyp verb cli '--libsass_ldflags=',
npm ERR! gyp verb cli '--libsass_library='
npm ERR! gyp verb cli ]
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@14.16.0 | win32 | x64
npm ERR! gyp verb command rebuild []
npm ERR! gyp verb command clean []
npm ERR! gyp verb clean removing "build" directory
npm ERR! gyp verb command configure []
npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp verb `which` failed python2 Error: not found: python2
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp verb `which` failed python Error: not found: python
npm ERR! gyp verb `which` failed at getNotFoundError (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:13:12)
npm ERR! gyp verb `which` failed at F (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:68:19)
npm ERR! gyp verb `which` failed at E (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:80:29)
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\which\which.js:89:16
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\index.js:42:5
npm ERR! gyp verb `which` failed at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:183:21) {
npm ERR! gyp verb `which` failed code: 'ENOENT'
npm ERR! gyp verb `which` failed }
npm ERR! gyp verb could not find "python". checking python launcher
npm ERR! gyp verb could not find "python". guessing location
npm ERR! gyp verb ensuring that file exists: C:\Python27\python.exe
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm ERR! gyp ERR! stack at PythonFinder.failNoPython (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-gyp\lib\configure.js:509:16)
npm ERR! gyp ERR! stack at C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\graceful-fs\polyfills.js:284:29
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19041
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\Desktop\\14531\\mall-admin-web\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd C:\Users\Administrator\Desktop\14531\mall-admin-web\node_modules\node-sass
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-04-06T07_40_11_291Z-debug.log
解決方案
npm install -g mirror-config-china --registry=http://registry.npm.taobao.org
npm install node-sass
npm install
原文鏈接:https://blog.csdn.net/qcc0716/article/details/115463828
相關推薦
- 2022-07-20 C語言深入刨析數據結構之棧與鏈棧的設計與應用_C 語言
- 2022-07-13 ELK 日志分析系統的部署
- 2023-02-12 PyCharm軟件無法安裝lxml庫的問題及解決_python
- 2022-11-09 Golang中字符串(string)與字節數組([]byte)一行代碼互轉實例_Golang
- 2022-08-02 goFrame的gqueue與channe的區別_Golang
- 2023-11-21 什么是交叉編譯、交叉編譯有什么用,為什么需要交叉編譯
- 2022-09-05 淺談異常分類及異常處理機制
- 2023-01-15 PyQt5+QtChart繪制散點圖_python
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支