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
37 stars 23 forks source link

Problem installing idb-connector #83

Closed jsev1x closed 5 years ago

jsev1x commented 5 years ago

Hi,

I'm having a problem trying to install idb-connector through npm 3.10.10 and node 6.17.0 on IBM i V7R2M0. The debug log is attached to this ticket. Partial npm output is below. From the npm output, it looks like the filename that npm is trying to download is incorrect as it's missing "64" from the filename (db2ia-v1.2.0-napi3-ibmi-ppc.tar.gz vs. db2ia-v1.2.0-napi3-ibmi-ppc64.tar.gz that the website shows)?

npm output: node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://github.com/IBM/nodejs-idb-connector/releases/download/1.2.0/db2ia-v1.2.0-napi3-ibmi-ppc.tar.gz node-pre-gyp WARN Pre-built binaries not found for idb-connector@1.2.0 and node@6.17.0 (node-v48 ABI, unknown) (falling back to source compile with node-gyp) gyp WARN install got an error, rolling back install

Thanks for your help and best regards, John npm-debug.log

jasonclake commented 5 years ago

@jsev1x Looks Like the latest release removed support for node 6.x https://github.com/IBM/nodejs-idb-connector/releases/tag/1.2.0

You could try an older version just to get started. Then plan to upgrade node if possible. See: https://bitbucket.org/ibmi/opensource/src/master/docs/yum/#markdown-header-online-install-instructions-without-acs-open-source-management-tool

jsev1x commented 5 years ago

Thanks. Node 6.17.0 seems to be the latest version that is available for v7.2 (updated via yum a few weeks ago). I'll look at installing the previous version.

jsev1x commented 5 years ago

Hmm, this is a bit new to me and I'm not sure what this means when I try to install the prior version. Apologies if this isn't the correct place to ask this.

$ npm install idb-connector@1.1.10

idb-connector@1.1.10 install /home/jsev/node_modules/idb-connector node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Tried to download(403): https://github.com/IBM/nodejs-idb-connector/releases/download/1.1.10/db2ia-v1.1.10-node-v48-ibmi-ppc.tar.gz node-pre-gyp WARN Pre-built binaries not found for idb-connector@1.1.10 and node@6.17.0 (node-v48 ABI, unknown) (falling back to source compile with node-gyp)

jasonclake commented 5 years ago

According to issue #63 it looks like they were running node 10 on v7r2. Look here #63 specifically the post from @abmusse. You may just have a path issue.

Not sure why you would get a 403 on the pre-compiled binary -- I still have node 6.14 installed and idb-connector@1.1.10 installs for me this morning without falling back on build from source.

jsev1x commented 5 years ago

Thanks all. After reading the above issue, the person had a path issue which it appears I had as well (though mine was caused by a CCSID issue with the .profile file). After correcting, I have managed to install it OK. I don't know how the person managed to install node 10 as issuing yum check-update shows no available updates (as does the ACS method). I can only assume it's been installed from a non-IBM i site.

dmabupt commented 5 years ago

Hello @jsev1x , Node.js v6.x is not part of the yum packages. It is a deprecated option of 5733OPS.

To install Node.js 10, you may call yum install nodejs10 if you have the yum environment installed. Node.js 8/10 can co-exists with Node.js v6.x because they have different install paths.

jsev1x commented 5 years ago

Thanks again, you people have been very helpful. It has confused me somewhat though. I entered "yum list installed" and noticed the following in the list: nodejs10.ppc64 10.15.3-0 @ibm/$releasever However, when I entered "node -v", I got: v6.17.0

Not sure why the system was using v6 however I tried using yum to install it again (I didn't specify the version as v10 was already there) and it installed v8: Installed: nodejs8.ppc64 0:8.15.1-0

And a list shows both versions now: nodejs10.ppc64 10.15.3-0 @ibm/$releasever nodejs8.ppc64 8.15.1-0 @ibm

However, now when I issue "node -v", it shows as v10: v10.15.3.

Confused however it seems to have sorted itself out. I guess I can probably remove v8 now. Thanks to everyone for their inputs!