IBM / nodejs-idb-connector

A JavaScript (Node.js) library for communicating with Db2 for IBM i, with support for queries, procedures, and much more. Uses traditional callback-style syntax
MIT License
38 stars 23 forks source link

Installation fails #89

Closed giammalab closed 4 years ago

giammalab commented 4 years ago

Hi everybody, i'am trying to install idb-connector on an IBM i V7r2 partition. Attached is the log of my last try to install. Additional info from my QSH

node -v
v10.16.3
$
npm -v
6.9.0
$
echo $PATH
/QOpenSys/pkgs/bin:/usr/bin:.:/QOpenSys/usr/bin $

2019-09-02T14_48_41_402Z-debug.log

kadler commented 4 years ago

Relevant line is

1205 warn lifecycle npm is using /QOpenSys/pkgs/lib/nodejs10/bin/node but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

You need to add /QOpenSys/pkgs/lib/nodejs10/bin to the PATH environment variable or pass --scripts-prepend-node-path to npm.

kadler commented 4 years ago

It seems you can also set this flag to always be enabled with npm config, eg. npm config set scripts-prepend-node-path auto

dmabupt commented 4 years ago

Hello @kadler Did you recreate the issue on your system? I may need a recreation to verify the code change. (The installation works fine on my system)

And I prefer to use the npm config set scripts-prepend-node-path auto solution.

dmabupt commented 4 years ago

Hello @giammalab , Do you accept the solutions provided by @kadler ? I will close this issue if no further question.

You need to add /QOpenSys/pkgs/lib/nodejs10/bin to the PATH environment variable or pass --scripts-prepend-node-path to npm.

dmabupt commented 4 years ago

Close this since we have a workaround for the issue.