Closed NotFakeAmigo closed 2 years ago
I too just discovered this. Nothing changed in my codebase.
If you not it has npm ERR! /bin/sh: 1: python: not found
(which is the same as mine).
My machine is a mac running 12.3 and they just removed python2 so not sure if this is a factor in this. (Setting alias for python3 to python) did not fix
Included my output as well
npm ERR! code 1
npm ERR! path /Users/michael/Source/pi-garage/service/node_modules/@vscode/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! CC(target) Release/obj.target/nothing/../../node-addon-api/nothing.o
npm ERR! LIBTOOL-STATIC Release/nothing.a
npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3360000/sqlite3.c
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@8.4.1
npm ERR! gyp info using node@16.14.2 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.12 found at "/opt/homebrew/opt/python@3.9/bin/python3.9"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/opt/homebrew/Cellar/node@16/16.14.2/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/michael/Source/pi-garage/service/node_modules/@vscode/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/homebrew/Cellar/node@16/16.14.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/michael/Library/Caches/node-gyp/16.14.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/michael/Library/Caches/node-gyp/16.14.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/Cellar/node@16/16.14.2/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/michael/Library/Caches/node-gyp/16.14.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/michael/Source/pi-garage/service/node_modules/@vscode/sqlite3',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
npm ERR! /bin/sh: python: command not found
npm ERR! make: *** [Release/obj/gen/sqlite-autoconf-3360000/sqlite3.c] Error 127
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/Cellar/node@16/16.14.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.4.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node@16/16.14.2/bin/node" "/opt/homebrew/Cellar/node@16/16.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/michael/Source/pi-garage/service/node_modules/@vscode/sqlite3
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
So some digging and I can't build node-sqlite3
as a project I get the same error as above.
However when I have a look at the deps/sqlite3.gyp
file there is a reference to just "python"
Even though I have aliased "python" to my homebrew "python3" it does not work
BUT when I change this to python3
instead of python
it works and I can build the project
Could be duplicate of https://github.com/mapbox/node-sqlite3/issues/1552
I fixed it with installing @vscode/sqlite3
package and then reinstalling all packages with npm install
. Also thanks to everyone for help! š
This should be fixed in sqlite3
v5.0.3 - let me know if you still experience issues š
brew install vips Solved my issue.
I have problem with installing
sqlite3@latest
. There is log (I am usingnode@v16.14.2
):