ibmdb / node-ibm_db

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

M1 Mac unsupported for versions >= 2.8.1 #889

Closed Ajetski closed 1 year ago

Ajetski commented 1 year ago

I am trying to run npm ci on a project depending on version 2.8.1 of this package. The error log is:

npm ERR! code 1
npm ERR! path /Users/ajet/work/cio/institutions/node_modules/ibm_db
npm ERR! command failed
npm ERR! command sh -c -- node installer/driverInstall.js
npm ERR! platform = darwin, arch = arm64, node.js version = v18.10.0
npm ERR! make version =GNU Make 3.81
npm ERR! M1 Chip system with arm64 architecture is not supported. Please install x64 version of node.js to install ibm_db.

After doing some digging through other issues I found that this issue was fixed in 2.8.0 but any version before or after seems to be broken still. This seems like a bug or regression for M1 macs to be unsupported in recent versions after having support in a prior release. See: https://github.com/ibmdb/node-ibm_db/issues/784#issuecomment-917872777

alok0007 commented 1 year ago

@Ajetski you need to install node x64 instead of arm64 on m1 chip and reinstall

bimalkjha commented 1 year ago

@Ajetski If you just search for M1 Chip on documentation page https://github.com/ibmdb/node-ibm_db, you'll see above info. For nodev 18.10.0 on M1 Chip system, you should use https://nodejs.org/dist/v18.10.0/node-v18.10.0-darwin-x64.tar.gz. You can just replace you existing node.js directory with this one and npm install ibm_db will work fine. Thanks.