簡體   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