npm install java给出了错误

时间:2016-06-07 14:34:19

标签: java node.js npm node-java

我从https://github.com/joeferner/node-java下载了node-java repo。我目前正在使用java版本1.7.0_79。控制面板中的系统变量指向C:\ Program Files \ Java \ jdk1.7.0_79 \ bin;更多信息

我运行npm install java但是我收到以下错误

> java@0.7.1 install C:\Users\kmidha\Desktop\node_modules\java
> node-gyp rebuild


C:\Users\kmidha\Desktop\node_modules\java>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
child_process: customFds option is deprecated, use stdio instead.
[node-java] Error: Command failed: C:\Windows\system32\cmd.exe /s /c "reg query "hklm\software\javasoft\java development kit""
ERROR: The system was unable to find the specified registry key or value.



Error: Command failed: C:\Windows\system32\cmd.exe /s /c "reg query "hklm\software\wow6432node\javasoft\java development kit""
ERROR: The system was unable to find the specified registry key or value.


gyp: Call to 'node findJavaHome.js' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\kmidha\Desktop\node_modules\java
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok 
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "java"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! java@0.7.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the java@0.7.1 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\kmidha\Desktop\npm-debug.log

我甚至尝试运行节点findJavaHome.js但是我收到此错误

[node-java] Error: Command failed: C:\Windows\system32\cmd.exe /s /c "reg query "hklm\software\javasoft\java development kit""
ERROR: The system was unable to find the specified registry key or value.

Error: Command failed: C:\Windows\system32\cmd.exe /s /c "reg query "hklm\software\wow6432node\javasoft\java development kit""
ERROR: The system was unable to find the specified registry key or value.

我正在使用Windows 7.我尝试搜索但无法找到答案。有人能帮助我吗?

0 个答案:

没有答案