npm not installing

299 views
Skip to first unread message

ad...@cs.miami.edu

unread,
Jun 16, 2017, 10:12:15 PM6/16/17
to node-java
I can provide the npm-debug.log if that will be helpful.

java version "1.7.0_80"

Ubuntu 14.04 32bit

I ran the command   npm install java

---------------------------

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/adam/node4.6/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-110-generic
gyp ERR! command "/home/adam/node4.6/bin/node" "/home/adam/node4.6/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/adam/node_modules/java
gyp ERR! node -v v4.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm ERR! Linux 3.13.0-110-generic
npm ERR! argv "/home/adam/node4.6/bin/node" "/home/adam/node4.6/bin/npm" "install" "java"
npm ERR! node v4.6.0
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! ja...@0.8.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ja...@0.8.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 information on how to open an issue for this project with:
npm ERR!     npm bugs java
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
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!     /home/adam/npm-debug.log

Brackett Dan

unread,
Feb 24, 2020, 8:49:53 PM2/24/20
to node-java
Hi, 

Did you ever get a resolution to this issue? 

Hassan Eslami

unread,
May 12, 2021, 1:57:38 PM5/12/21
to node-java
If you happen to have a solution, could you please share?   I'm tool unable to install.

alan tang

unread,
Jun 15, 2021, 4:24:26 AM6/15/21
to node-java
Hi all,

Any solution to these issues?

alan tang

unread,
Jun 17, 2021, 10:06:19 PM6/17/21
to node-java

Hi all,

I got the solution for the windows 

Node JS version: 14.7.1
Npm Version: 7.17.0
python: 2.7

// Npm config list
msvs_version: "2017"

1) Download JDK
Manually download JDK. You may use the link below

2) set JAVA_HOME to JDK home folder
Just go to Environment Variables set up the path. You make check the link below, telling you how to set up the path on windows or UNIX System

3) Restart the computer

4) Run "npm install --global --production windows-build-tools " in administrator CMD
Make sure you have installed python via NPM

5) Run "npm i java" in CMD
If you installed success, you may ignore step 6 and 7.
If you get the error msg, pls go to step 6 and 7.

6) Delete node_modules and package-lock.json

7) Run "npm install" in CMD

8) Repeat step 5
You may install successfully. If you still get the error, you may need to find another solution.

Hope you guys can install it successfully!

Thanks
Reply all
Reply to author
Forward
0 new messages