I am learning/experimenting with Nodejs on the iSeries and apparently I
have broken something with npm. Nodejs still seems to be working fine, but
trying to install some thing with npm results in an error.
Possible cause, I found instructions on how to get yum/rpm installed, got
that done and got some of my tools I am more familiar with installed (nano,
less, etc). I also installed Node 8, but had issues with since v6 was in
the default path and when trying to run v8 I would get library errors, so I
used "yum erase" to remove node v8 and it was removed without an issue. I
figure either installing v8 or removing it broke something with npm. I am
just not sure what I can do to get things working again.
The issue: I have tried to install both ibm-db2 and node-jt400 to learn to
communicate with db2 on the i, and both result with the following error and
crash the shell. Any help would be appreciated. It looks like something in
node-gyp is dying.
Here is the results from an attempt:
[bash]$node -v
v6.11.5
[bash]$npm -v
2.15.1
[bash]$which node
/usr/bin/node
[bash]$which npm
/usr/bin/npm
[bash]$npm i node-jt400
\
java@0.8.0 install
/home/KEVIN/devel/ects_learn/node_modules/node-jt400/node_modules/java
node-gyp rebuild
gyp: Undefined variable javahome in binding.gyp 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
(/QOpenSys/QIBM/ProdData/Node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:422:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:219:12)
gyp ERR! System OS400 7.2
gyp ERR! command "/QOpenSys/QIBM/ProdData/OPS/Node6/bin/node"
"/QOpenSys/QIBM/ProdData/Node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd
/home/KEVIN/devel/ects_learn/node_modules/node-jt400/node_modules/java
gyp ERR! node -v v6.11.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR!
─────────────────────────────────────────────────────────────────────────────────────────────────────────
Session stopped
As an Amazon Associate we earn from qualifying purchases.