IBM / node-red-contrib-db2-for-i

A Node-RED node to read and write to a Db2 for i database from Node-RED on IBM i.
https://flows.nodered.org/node/node-red-contrib-db2-for-i
8 stars 7 forks source link

node-red-contrib-db2-for-i 0.2.1 fails install #12

Closed AndyYouens closed 1 year ago

AndyYouens commented 1 year ago

running IBMi @7.3 latest cums & PTF groups

node version 18.8 npm version 8.19 Node-RED version: v3.0.2

2022-10-24T08:09:55.405Z Install : node-red-contrib-db2-for-i 0.2.1

2022-10-24T08:09:55.437Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-db2-for-i@0.2.1 2022-10-24T08:09:57.780Z [err] npm 2022-10-24T08:09:57.781Z [err] WARN config production Use --omit=dev instead. 2022-10-24T08:10:01.887Z [err] npm 2022-10-24T08:10:01.887Z [err] ERR! code 127 2022-10-24T08:10:01.887Z [err] npm 2022-10-24T08:10:01.887Z [err] ERR! path 2022-10-24T08:10:01.887Z [err] /home/andy/.node-red/node_modules/idb-connector 2022-10-24T08:10:01.891Z [err] npm 2022-10-24T08:10:01.891Z [err] ERR! command failed 2022-10-24T08:10:01.891Z [err] npm ERR! command 2022-10-24T08:10:01.892Z [err] sh -c -- node-pre-gyp install --fallback-to-build 2022-10-24T08:10:01.892Z [err] npm 2022-10-24T08:10:01.892Z [err] ERR! node-pre-gyp install --fallback-to-build: --: not found 2022-10-24T08:10:01.895Z [err] 2022-10-24T08:10:01.895Z [err] npm 2022-10-24T08:10:01.895Z [err] ERR! A complete log of this run can be found in: 2022-10-24T08:10:01.895Z [err] npm ERR! 2022-10-24T08:10:01.895Z [err] /HOME/ANDY/.npm/_logs/2022-10-24T08_09_57_731Z-debug-0.log 2022-10-24T08:10:01.970Z rc=127

bmarolleau commented 1 year ago

Hi @AndyYouens , I got many similar questions these days and your article is a good reminder and I invite each user to visit this page : https://powerwire.eu/node-red-db2-for-i-connector/

Well, indeed, as said in the documentation, idb-connector needs to be installed prior to using this Node-RED node for db2. As a package dependency, idb-connector should automatically be installed by npm package manager when installing node-red-contrib-db2-for-i as shown below. If it's not the case - and unfortunately, you can experience such situation, we need to investigate why - then a manual install of this idb-connector package is required. Thank you for pointing out this issue.

bash-5.1$ npm i node-red-contrib-db2-for-i --loglevel verbose
npm verb cli /QOpenSys/pkgs/lib/nodejs16/bin/node /QOpenSys/pkgs/bin/npm
npm info using [npm@8.11.0](mailto:npm@8.11.0)
npm info using [node@v16.16.0](mailto:node@v16.16.0)
npm timing build:link:node_modules/rimraf Completed in 18ms
npm timing build:link Completed in 21ms
npm info run [idb-connector@1.2.18](mailto:idb-connector@1.2.18) install node_modules/idb-connector node-pre-gyp install --fallback-to-build
npm info run [idb-connector@1.2.18](mailto:idb-connector@1.2.18) install { code: 0, signal: null }
npm timing build:run:install:node_modules/idb-connector Completed in 1682ms
npm timing build:run:install Completed in 1683ms

bash-5.1$ npm list
USERNAME@ /home/<USERNAME>
└── [node-red-contrib-db2-for-i@0.2.1](mailto:node-red-contrib-db2-for-i@0.2.1)

Use npm list --depth=n to show the dependency tree with a specified depth.

bash-5.1$ npm list --depth=0
USERNAME@ /home/USERNAME
└── [node-red-contrib-db2-for-i@0.2.1](mailto:node-red-contrib-db2-for-i@0.2.1)

bash-5.1$ npm list --depth=1
USERNAME@ /home/USERNAME
└─┬ [node-red-contrib-db2-for-i@0.2.1](mailto:node-red-contrib-db2-for-i@0.2.1)
  **└── [idb-connector@1.2.18](mailto:idb-connector@1.2.18)**
AndyYouens commented 1 year ago

So, has this issue been resolved, or just closed? the problem is still there :-(