【问题标题】:npm ERR! code 1.Why this error massage gonna happen npm ERR! code 1? How can I fix itnpm 错误!代码 1.为什么这个错误消息会发生 npm ERR!代码1?我该如何解决
【发布时间】:2021-08-23 19:46:36
【问题描述】:

这是错误代码:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'reactjs-percentage-circle@1.0.0',  
npm WARN EBADENGINE   required: { node: '>=6.0.0', npm: '~3.3.6' },
npm WARN EBADENGINE   current: { node: 'v15.10.0', npm: '7.16.0' } 
npm WARN EBADENGINE }
npm ERR! code 1
npm ERR! path D:\Buman Project\geniusClone\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.10.0 | win32 | x64
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 (D:\Buman Project\geniusClone\node_modules\node-gyp\lib\configure.js:484:19)
npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (D:\Buman Project\geniusClone\node_modules\node-gyp\lib\configure.js:509:16)npm ERR! gyp ERR! stack     at callback (D:\Buman Project\geniusClone\node_modules\graceful-fs\polyfills.js:299:20)
npm ERR! gyp ERR! stack     at FSReqCallback.oncomplete (node:fs:196:21)
npm ERR! gyp ERR! System Windows_NT 10.0.18363
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Buman Project\\geniusClone\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\Buman Project\geniusClone\node_modules\node-sass
npm ERR! gyp ERR! node -v v15.10.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Zolboo\AppData\Local\npm-cache\_logs\2021-06-06T12_41_51_207Z-debug.log

【问题讨论】:

    标签: reactjs npm-install build-error


    【解决方案1】:

    有两个问题

    1. 是一个警告(可能会被忽略)这个包需要一个 npm 版本~3.3.6,这意味着&gt;= 3.3.6&lt; 3.4,即每个3.3.x,其中x &gt;= 6。您的 npm 版本 7.16. 不满足此要求。此外,

    2. node-gyp 需要在您的系统上安装 python,但没有找到任何...请参阅docs,了解如何在 Windows 上安装和配置 node-gyp。

    【讨论】:

      猜你喜欢
      • 2021-07-27
      • 2021-01-18
      • 2021-07-10
      • 2020-02-12
      • 2020-12-27
      • 2021-10-18
      • 2020-09-18
      相关资源
      最近更新 更多