首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm安装引线到gyp错误!构建错误(node-java)

npm安装引线到gyp错误!构建错误(node-java)
EN

Stack Overflow用户
提问于 2016-01-27 18:48:57
回答 2查看 652关注 0票数 0

我有nodejs和java代码的项目,该项目在MAC上工作良好,但

当尝试在Windows7 64位上安装项目时,我得到以下错误:

代码语言:javascript
复制
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074
:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\HDaghash\Documents\QosAdministration\node_modules\java
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! java@0.6.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java@0.6.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the java package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls java
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\HDaghash\Documents\QosAdministration\npm-debug.log

我试图安装visual studio 2012而不是2013,就像我在github上看到的那样,但同样的问题仍然存在。

有谁可以帮助解决这个问题吗?

提前谢谢。

EN

回答 2

Stack Overflow用户

发布于 2016-01-27 21:09:41

它依赖于node-gyp节点模块,并且node-gyp不会安装在windows中。

票数 0
EN

Stack Overflow用户

发布于 2017-02-08 19:23:25

这就是解决方案。

Java安装程序

代码语言:javascript
复制
npm install -g node-gyp

运行

在管理员特权命令提示符窗口中

代码语言:javascript
复制
npm install --global --production windows-build-tools
npm update
npm install java
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35035236

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档