首页 文章

在Window 10上运行npm install -g composer-cli时出错

提问于
浏览
0

我正在运行命令npm install -g composer-cli但面临以下错误:

gyp ERR!配置错误gyp ERR!堆栈错误: gyp 失败,退出代码:1 gyp ERR!堆栈在ChildProcess.onCpExit(C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ node-gyp \ lib \ configure.js:336:16)gyp ERR!堆栈在emitTwo(events.js:126:13)gyp ERR!在ChildProcess.emit堆栈(events.js:214:7)gyp ERR! Process.ChildProcess._handle.onexit(internal / child_process.js:198:12)gyp ERR!系统Windows_NT 10.0.16299 gyp ERR!命令"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\ Users \ vb0094005 \ AppData \ Roaming \ npm \ node_modules \ composer-cli \ node_modules \ node-report gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.6.2 gyp ERR!不行npm WARN可选SKIPPING OPTIONAL DEPENDENCY:fsevents@1.2.4(node_modules \ composer-cli \ node_modules \ fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY:不支持的fsevents@1.2.4平台:想要{"os":"darwin","arch": "any"}(当前:{"os":"win32","arch":"x64"})

错误的ERR!代码ELIFECYCLE npm ERR!错误1 npm ERR! node-report@2.2.1安装: node-gyp rebuild npm ERR!退出状态1 npm ERR!错误的ERR!在node-report@2.2.1安装脚本失败 . 错误的ERR!这可能不是npm的问题 . 上面可能有额外的日志记录输出 .

我尝试了文章中提到的所有内容:https://github.com/nodejs/node-gyp但没有运气 .

节点版本:v8.11.1 npm版本:5.6.0 node-gyp:v3.8.0

请帮忙解决这个错误 .

1 回答

相关问题