我正在运行命令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 回答
目前不支持此平台 - 请参阅https://hyperledger.github.io/composer/latest/installing/installing-prereqs.html . 我建议您使用虚拟机管理程序(如VirtualBox for Windows 10 Professional环境) - 内置的Hyper-V支持允许运行Linux虚拟机,您可以在其中安装Hyperledger Composer . 我们还建议在VM中使用Ubuntu 16.04,因为这是我们最常测试的级别 .
如果您坚持使用Windows,则有人为Windows安装共享了一些资源(按原样提供) - > https://davidkel.github.io/docs/Windows/Intro.html