Closed egriff38 closed 1 year ago
@egriff38 This issue is due to old version on node-gyp package that comes with npm. We can see node-gyp -v v5.1.1
in the shared output. Latest version of node-gyp
package is v9.3.1. This issue is fixed in latest version of node-gyp package.
Probably your system has old version of npm
installed and you need to upgrade npm using command npm install npm@latest -g
. Please check output of npm -v
command. The latest version of npm is 9.6.1.
After updating npm, cd to /Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm
and check output of npm ls node-gyp
command. If you see version of node-gyp is older, then run below commands:
cd /Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm
npm install node-gyp@latest
Now, you should be able to install ibm_db
. Thanks.
That worked, thanks. Not entirely sure how the npm version reverted, but installing the latest version did fix it.
Operating System Name: MacOS 13.2.1
db2level output from clidriver if in use: NA
Target Db2 Server Version: NA
node.js Version: 14.21.3
ibm_db version: 3.1.0
For non-Windows, output of below commands: uname:
Darwin
uname -m:arm64
Value of below environment variables if set: IBM_DB_HOME:
/Applications/dsdriver
PATH:/opt/homebrew/opt/python@3.10/bin:/Users/egriff38/.nvm/versions/node/v14.21.3/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/egriff38/.cargo/bin:/Users/egriff38/.fig/bin:/Users/egriff38/.local/bin
LIB/LD_LIBRARY_PATH/DYLD_LIBRARY_PATH: NoneTest script to reproduce the problem:
npm i ibm_db
For installation related issue, complete output of
npm install ibm_db
command.platform = darwin, arch = x64, node.js version = v14.21.3 make version =GNU Make 3.81 IBM_DB_HOME environment variable have already set to -> /Applications/dsdriver
Downloading of clidriver skipped - build is in progress...
Error: Command failed: node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME" Traceback (most recent call last): File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in
sys.exit(gyp.script_main())
^^^^^^^^^^^^^^^^^
File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 554, in script_main
return main(sys.argv[1:])
^^^^^^^^^^^^^^^^^^
File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 547, in main
return gyp_main(args)
^^^^^^^^^^^^^^
File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 520, in gyp_main
[generator, flat_list, targets, data] = Load(
^^^^^
File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 136, in Load
result = gyp.input.Load(build_files, default_variables, includes[:],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
LoadTargetBuildFile(build_file, data, aux_data,
File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
build_file_contents = open(build_file_path, 'rU').read()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error:
gyp
failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) gyp ERR! stack at ChildProcess.emit (events.js:400:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12) gyp ERR! System Darwin 22.3.0 gyp ERR! command "/Users/egriff38/.nvm/versions/node/v14.21.3/bin/node" "/Users/egriff38/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IS_DOWNLOADED=false" "--IBM_DB_HOME=/Applications/dsdriver" gyp ERR! cwd /Users/egriff38/Kollacode/edit/backend/node_modules/ibm_db gyp ERR! node -v v14.21.3 gyp ERR! node-gyp -v v5.1.1 gyp ERR! not okkilled: false, code: 1, signal: null, cmd: 'node-gyp configure build --IS_DOWNLOADED=false --IBM_DB_HOME="$IBM_DB_HOME"' } npm WARN backend@1.0.0 No description npm WARN backend@1.0.0 No repository field.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ibm_db@3.1.0 install:
node installer/driverInstall.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ibm_db@3.1.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /Users/egriff38/.npm/_logs/2023-03-14T13_51_06_319Z-debug.log