繁体   English   中英

尽管安装了 npm,但 npm install 会引发错误

[英]npm install throws error although npm is installed

我的系统上有 npm,npm -v 给出了我的 6.13.4,但是使用“npm install”命令给出了我和错误,它的哪一部分可以在下面看到。 请指教。

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\git\ps\ps\node_modules\sinek\node_modules\node-rdkafka
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for node-rdkafka@2.7.0: wanted: {"node":"<=10"} (current: {"node":"12.13.1","npm":"6.13.4"})
npm WARN notsup Not compatible with your version of node/npm: node-rdkafka@2.7.0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: inotify@1.4.6 (node_modules\inotify):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for inotify@1.4.6: wanted {"os":"linux","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-rdkafka@2.7.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-rdkafka@2.7.0 install 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\AppData\Roaming\npm-cache\_logs\2019-12-11T21_18_12_459Z-debug.log

问题不在于 npm。 这个包 node-rdkafka@2.7.0 是您系统的当前节点版本。

node-rdkafka只支持 node 版本 <=10。

您正在运行 12.13.1

您可以使用 nvm(节点版本管理器)来安装节点 10 或尝试安装节点 rdafka 的兼容版本。 node-rdafka 的 12.x 功能的工作仍在进行中

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM