ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
188 stars 151 forks source link

Bug Report: Building fail with NodeJS 19.0.1 #892

Closed orangecoding closed 1 year ago

orangecoding commented 1 year ago

With the latest version of NodeJS (19.0.1) the build fails.

Running on Mac OS Ventura

Error: Command failed: node-gyp configure build  --IS_DOWNLOADED=true --IBM_DB_HOME="$IBM_DB_HOME"
gyp info it worked if it ends with ok
gyp info using node-gyp@9.1.0
gyp info using node@19.0.1 | darwin | x64
gyp info find Python using Python version 3.10.8 found at "/usr/local/opt/python@3.10/bin/python3.10"
gyp http GET https://nodejs.org/download/release/v19.0.1/node-v19.0.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v19.0.1/node-v19.0.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v19.0.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v19.0.1/SHASUMS256.txt
bimalkjha commented 1 year ago

@orangecoding First install nan using npm install nan@latest and then run npm install ibm_db. It should work. Thanks.

orangecoding commented 1 year ago

That did not help unfortunately

orangecoding commented 1 year ago

Did you try it yourself with NodeJs V19.0.1?

bimalkjha commented 1 year ago

@orangecoding Yes, it worked for me using node v19.1.0. See the below output:

blr-d-macos02.rocketsoftware.com: bjha/nodework/installed> npm ls nan
/Users/bjha/nodework/installed
`-- (empty)

blr-d-macos02.rocketsoftware.com: bjha/nodework/installed> node -v
v19.1.0
blr-d-macos02.rocketsoftware.com: bjha/nodework/installed> npm install ibm_db

added 60 packages, and audited 61 packages in 20s

4 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
blr-d-macos02.rocketsoftware.com: bjha/nodework/installed> npm ls nan
installed@ /Users/bjha/nodework/installed
`-- ibm_db@3.0.0
  `-- nan@2.17.0

blr-d-macos02.rocketsoftware.com: bjha/nodework/installed>

If it fails for you, then check output of command npm ls nan before and after npm install ibm_db. The issue faced by you is will nan@2.16.0 but not with latest version of nan. Thanks.

orangecoding commented 1 year ago

I have a bunch of dependencies, ibm_db is just one. If I run npm install on my package.json, it fails. The output is:

cedp@1.0.0 
└─┬ ibm_db@3.0.0
  └── nan@2.16.0
bimalkjha commented 1 year ago

@orangecoding Your nan version is 2.16.0 which is not for NodeJS 19.x. nan version should be 2.17.0, then only you can install ibm_db. Please update it accordingly. Otherwise, we'll have a new release of ibm_db this week, then this issue will get fixed. We are going to update nan version. Thanks.

bimalkjha commented 1 year ago

@orangecoding Released a new version of ibm_db@3.1.0 with support for Node.js v19.x. Thanks.