I'm having some issue's installing argon2 npm package in my project. I am a bit of a beginner and have tried to check everything:
To start this is my system:
MacBook Air m1 6 months old
Python
3.10.2
Clang
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Make
GNU Make 3.81
This program built for i386-apple-darwin11.3.0
Installed:
sudo npm install -g node-gyp
within the package but globally
If I go inside the node-gyp folder:
node-gyp#9.0.0 /usr/local/lib/node_modules/node-gyp
node#17.6.0
So it looks like I have everything to get it running.
After the command for argon2:
npm i argon2
npm ERR! code 1
npm ERR! path /Users/billy/Wild Code School/Express/MVC_architecture/Express-----
Quests/node_modules/argon2
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/ref.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/argon2.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/core.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/blake2/blake2b.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/thread.o
npm ERR! CC(target) Release/obj.target/libargon2/argon2/src/encoding.o
npm ERR! LIBTOOL-STATIC Release/argon2.a
npm ERR! CXX(target) Release/obj.target/argon2/src/argon2_node.o
npm ERR! Failed to execute '/usr/local/bin/node
/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --
fallback-to-build --module=/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2/lib/binding/napi-
v3/argon2.node --module_name=argon2 --module_path=/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2/lib/binding/napi-
v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --
node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#1.0.9
npm ERR! node-pre-gyp info using node#17.6.0 | darwin | arm64
npm ERR! node-pre-gyp info check checked for "/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2/lib/binding/napi-
v3/argon2.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/ranisalt/node-
argon2/releases/download/v0.28.5/argon2-v0.28.5-napi-v3-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on
https://github.com/ranisalt/node-argon2/releases/download/v0.28.5/argon2-v0.28.5-
napi-v3-darwin-arm64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for argon2#0.28.5 and
node#17.6.0 (node-v102 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on
https://github.com/ranisalt/node-argon2/releases/download/v0.28.5/argon2-v0.28.5-
napi-v3-darwin-arm64-unknown.tar.gz
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#17.6.0 | darwin | arm64
npm ERR! gyp info ok
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#17.6.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.10.2 found at
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
npm ERR! gyp info spawn
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/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/billy/Wild Code
School/Express/MVC_architecture/Express-
Quests/node_modules/argon2/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-
gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/billy/Library/Caches/node-
gyp/17.6.0/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/billy/Library/Caches/node-
gyp/17.6.0',
npm ERR! gyp info spawn args '-
Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/billy/Library/Caches/node-
gyp/17.6.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2',
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 ok
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#17.6.0 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! clang: error: no such file or directory: 'Code'
npm ERR! clang: error: no such file or directory:
'School/Express/MVC_architecture/Express-Quests/node_modules/node-addon-api'
npm ERR! make: *** [Release/obj.target/argon2/src/argon2_node.o] Error 1
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
(/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit
(node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command "/usr/local/bin/node"
"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--
fallback-to-build" "--module=/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2/lib/binding/napi-
v3/argon2.node" "--module_name=argon2" "--module_path=/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2/lib/binding/napi-
v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--
node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2
npm ERR! gyp ERR! node -v v17.6.0
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node
/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --
fallback-to-build --module=/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2/lib/binding/napi-
v3/argon2.node --module_name=argon2 --module_path=/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2/lib/binding/napi-
v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --
node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/billy/Wild
Code School/Express/MVC_architecture/Express-Quests/node_modules/#mapbox/node-pre-
gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose
(node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit
(node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.5.0
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/.bin/node-pre-gyp"
"install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/billy/Wild Code
School/Express/MVC_architecture/Express-Quests/node_modules/argon2
npm ERR! node-pre-gyp ERR! node -v v17.6.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/billy/.npm/_logs/2022-06-10T13_25_52_362Z-debug-0.log
Related
I got this error after I run "npm install". The warning only appear on the connection part for my chatbot and dialogflow. I try to downgrade my node version by using node 10 and also node 12, but the error still persist.The error state that to use grpc/grpc-js instead of grpc#1.24.11, but I didn't have grpc#1.24.11 on my package file. My node and my npm version is on the code that I provide. Thanks in advance. Here is the error:
npm WARN EBADENGINE package: undefined,
npm WARN EBADENGINE required: { node: '10' },
npm WARN EBADENGINE current: { node: 'v17.8.0', npm: '8.5.5' }
npm WARN EBADENGINE }
npm WARN deprecated grpc#1.24.11: This library will not receive further updates other than security fixes. We recommend using #grpc/grpc-js instead.
npm ERR! code 1
npm ERR! path /home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! make: Entering directory '/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/build'
This is the error it gave after it try to reify grpc
npm ERR! make: Leaving directory '/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/build'
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#1.0.9
npm ERR! node-pre-gyp info using node#17.8.0 | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node" (not found)
npm ERR! node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v102-linux-x64-glibc.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v102-linux-x64-glibc.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for grpc#1.24.11 and node#17.8.0 (node-v102 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v102-linux-x64-glibc.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#17.8.0 | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#17.8.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/lib/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 '/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/zakwan/.cache/node-gyp/17.8.0/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=/home/zakwan/.cache/node-gyp/17.8.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/zakwan/.cache/node-gyp/17.8.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc',
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 ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#9.0.0
npm ERR! gyp info using node#17.8.0 | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In function ‘Slice sub_no_ref(const Slice&, size_t, size_t) [with Slice = grpc_slice]’,
npm ERR! inlined from ‘grpc_slice grpc_slice_sub_no_ref(grpc_slice, size_t, size_t)’ at ../deps/grpc/src/core/lib/slice/slice.cc:344:20,
npm ERR! inlined from ‘grpc_slice grpc_slice_sub(grpc_slice, size_t, size_t)’ at ../deps/grpc/src/core/lib/slice/slice.cc:361:35:
npm ERR! ../deps/grpc/src/core/lib/slice/slice.cc:337:11: warning: ‘void* memcpy(void*, const void*, size_t)’ forming offset 32 is out of the bounds [0, 32] of object ‘<anonymous>’ with type ‘grpc_slice’ [-Warray-bounds]
npm ERR! 337 | memcpy(subset.data.inlined.bytes, source.data.inlined.bytes + begin,
npm ERR! | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 338 | end - begin);
npm ERR! | ~~~~~~~~~~~~
npm ERR! ../deps/grpc/src/core/lib/slice/slice.cc: In function ‘grpc_slice grpc_slice_sub(grpc_slice, size_t, size_t)’:
npm ERR! ../deps/grpc/src/core/lib/slice/slice.cc:352:12: note: ‘<anonymous>’ declared here
npm ERR! 352 | grpc_slice grpc_slice_sub(grpc_slice source, size_t begin, size_t end) {
npm ERR! | ^~~~~~~~~~~~~~
npm ERR! In file included from /home/zakwan/.cache/node-gyp/17.8.0/include/node/openssl/rsa.h:14,
npm ERR! from ../deps/grpc/src/core/lib/security/credentials/jwt/json_token.h:27,
npm ERR! from ../deps/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.h:25,
npm ERR! from ../deps/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc:41:
npm ERR! /home/zakwan/.cache/node-gyp/17.8.0/include/node/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
npm ERR! 155 | # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
npm ERR! | ^~~~~
npm ERR! make: *** [grpc.target.mk:546: Release/obj.target/grpc/deps/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.o] Error 1
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 (/usr/lib/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.17.1-zen1-1-zen
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"
npm ERR! gyp ERR! cwd /home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc
npm ERR! gyp ERR! node -v v17.8.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/#mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Linux 5.17.1-zen1-1-zen
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
npm ERR! node-pre-gyp ERR! cwd /home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc
npm ERR! node-pre-gyp ERR! node -v v17.8.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/zakwan/.npm/_logs/2022-04-05T05_43_46_347Z-debug-0.log```
I found answer here link. Use #grpc/grpc-js instead grpc in your package.json file.
I encountered same issue, problem was python was not installed in my machine, So I installed python and issue was fixed
I don't really know why, but when i build my app using my ci/cd on Gitlab it fails with the error stack hereinafter.
On my computer i don't have an npm install issue.
Locally I have node: 16.13.2 and npm 8.1.2
On Gitlab for the ci/cd the image we use has node: 'v16.13.1' and npm: '8.1.3'
npm ERR! code 1
npm ERR! path /builds/gara-project/gara-front-end/gara-console/node_modules/grpc
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-musl --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.14.0
npm ERR! node-pre-gyp info using node#16.13.1 | linux | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info build requesting source compile
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.3.0
npm ERR! gyp info using node#16.13.1 | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.3.0
npm ERR! gyp info using node#16.13.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.9.7 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.13.1/node-v16.13.1-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.1/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v16.13.1/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/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 '/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.13.1/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=/root/.cache/node-gyp/16.13.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/builds/gara-project/gara-front-end/gara-console/node_modules/grpc',
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 ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.3.0
npm ERR! gyp info using node#16.13.1 | linux | x64
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.4.109+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-musl/grpc_node.node" "--module_name=grpc_node" "--module_path=/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-musl" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /builds/gara-project/gara-front-end/gara-console/node_modules/grpc
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.3.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/src/node/extension_binary/node-v93-linux-x64-musl --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.4.109+
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/builds/gara-project/gara-front-end/gara-console/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
npm ERR! node-pre-gyp ERR! cwd /builds/gara-project/gara-front-end/gara-console/node_modules/grpc
npm ERR! node-pre-gyp ERR! node -v v16.13.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.14.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-25T15_43_04_463Z-debug.log
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
I tried a lot of solutions found on internet npm install --build-from-source or add it in package.json but most of them seems not working
The problem:
Basically I cannot manage to install the last version of tensorflow for node (npm install #tensorflow/tfjs-node).
Main concern:
which versions of node.js, node-gyp, node-pre-gyp, visual studio code and python may I use?
As the followed steps to be able to reproduce the error:
I installed visual studio community with c++ packages (2017 and 2019)
I installed python 3.10.1
node-gyp configure --msvs_version=2017
npm i -g node-gyp
npm i -g #mapbox/node-pre-gyp
Also I have tried with the following:
npm install --python=python2.7
npm config set python python2.7
however, it looks like this version of node-gyp does not support python 2.7
The error:
npm ERR! code 1
npm ERR! path C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules#tensorflow\tfjs-node
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/install.js
npm ERR! CPU-windows-3.12.0.zip
npm ERR! https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.7.0.zip
npm ERR! node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#1.0.4
npm ERR! node-pre-gyp info using node#16.13.1 | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules#tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" (not found)
npm ERR! node-pre-gyp http GET https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/3.12.0/CPU-windows-3.12.0.zip
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/3.12.0/CPU-windows-3.12.0.zip
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for #tensorflow/tfjs-node#3.12.0 and node#16.13.1 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/3.12.0/CPU-windows-3.12.0.zip
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.13.1 | win32 | x64
npm ERR! gyp info ok
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.13.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.10.1 found at "C:\Users\Javi\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1759) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Javi\AppData\Local\Programs\Python\Python310\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\Javi\AppData\Roaming\npm\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 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules\#tensorflow\tfjs-node\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Javi\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Javi\AppData\Local\node-gyp\Cache\16.13.1\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=C:\Users\Javi\AppData\Local\node-gyp\Cache\16.13.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\Javi\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\Javi\\AppData\\Local\\node-gyp\\Cache\\16.13.1\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules\#tensorflow\tfjs-node',
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 'C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules\#tensorflow\tfjs-node\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
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.13.1 | win32 | x64
npm ERR! gyp info spawn C:/Program Files (x86)/MSBuild/14.0/Bin
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! UNCAUGHT EXCEPTION
npm ERR! gyp ERR! stack Error: spawn C:/Program Files (x86)/MSBuild/14.0/Bin ENOENT
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
npm ERR! gyp ERR! stack at onErrorNT (node:internal/child_process:477:16)
npm ERR! gyp ERR! stack at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Javi\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules\#tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules\#tensorflow\tfjs-node\lib\napi-v8" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=8" "--node_napi_label=napi-v8"
npm ERR! gyp ERR! cwd C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules#tensorflow\tfjs-node
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! Node-gyp failed to build your package.
npm ERR! gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Javi\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules#tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules#tensorflow\tfjs-node\lib\napi-v8 --napi_version=8 --node_abi_napi=napi --napi_build_version=8 --node_napi_label=napi-v8' (7)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules#tensorflow\tfjs-node\node_modules#mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19043
npm ERR! node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules\#tensorflow\tfjs-node\node_modules\#mapbox\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\Javi\Documents\GitHub\AI_ATest_Composer\node_modules#tensorflow\tfjs-node
npm ERR! node-pre-gyp ERR! node -v v16.13.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.4
npm ERR! node-pre-gyp ERR! not ok
npm ERR! * Downloading libtensorflow
npm ERR!
npm ERR! * Building TensorFlow Node.js bindings
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Javi\AppData\Local\npm-cache_logs\2022-01-07T13_43_16_353Z-debug-0.log
What I have tried:
I am almost sure it must be a problem with versions and I tried different combinations.
I tried with visual studio code 2015, 2017 and 2019. (2019 gives me an error while trying to node-gyp configure --msvs_version=2019). Also with the last version of node-gyp and the 3.8.0 since in some post I read it worked for somebody, also I tried with deprecated version of node-pre-gyp as well as the last version of #mapbox/node-pre-gyp. All this in node 16.13.1.
In other versions of node I also tried having the visual studio of 2015 with python 2.7 since in some posts it appears like a possible solution.
At the moment I even do not know how many other things I tried since I have been trying out things for two weeks. Finally, I decided to make this post to seek for some help.
System information:
-Windows 10 x64
-node version 16.13.1 (the current recommended in node js webpage)
-visual studio community 2017 and 2019 installed
-python version 2.7 and 3.10.1 installed
-#tensorflow/tfjs 3.12.0
-#mapbox/node-pre-gyp 1.0.8
-node-gyp 8.4.1
Apparently it seemed there was a problem with that version of tfjs-node. Downgrading it worked and also running it on ubuntu too.
I've a problem.
I made a bot on Windows with the module Discord.js and now, i want to run it on my Raspberry Pi 4. My application needs sqlite3 but when i do npm install (even with sudo) to install all my packages, it returns this (i'm not comfortable with Nodejs errors) :
$ sudo npm install
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated node-pre-gyp#0.11.0: Please upgrade to #mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the #mapbox scoped package will recieve updates in the future
npm ERR! code 1
npm ERR! path /home/ubuntu/project/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/project/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/ubuntu/project/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.11.0
npm ERR! node-pre-gyp info using node#16.6.1 | linux | arm64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/home/ubuntu/project/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node" (not found)
npm ERR! node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
npm ERR! node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3#5.0.2 and node#16.6.1 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-linux-arm64.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | linux | arm64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | linux | arm64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/usr/bin/python3"
npm ERR! (node:62288) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/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 '/home/ubuntu/project/node_modules/sqlite3/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/ubuntu/.cache/node-gyp/16.6.1/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=/home/ubuntu/.cache/node-gyp/16.6.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/ubuntu/.cache/node-gyp/16.6.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/ubuntu/project/node_modules/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 ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#16.6.1 | linux | arm64
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at step (/usr/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at subStep (/usr/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.11.0-1007-raspi
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/ubuntu/project/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/ubuntu/project/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /home/ubuntu/project/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.6.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/ubuntu/project/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/ubuntu/project/node_modules/sqlite3/lib/binding/napi-v3-linux-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/ubuntu/project/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.11.0-1007-raspi
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/ubuntu/project/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/ubuntu/project/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.6.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2021-08-10T08_46_29_583Z-debug.log
my package.json
{
"name": "project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"discord.js": "^12.5.3",
"sqlite3": "^5.0.2"
},
"scripts": {
"test": "node ."
}
}
NB
$ node -v
v16.6.1
$ npm -v
7.20.3
$ python --version
Python 3.9.5
Can you help me?
i am using npm i but it is making an error
npm ERR! code 1
npm ERR! path /home/nico/Desktop/myself/my-projects/trans/node_modules/kerberos
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! make: Entering directory '/home/nico/Desktop/myself/my-projects/trans/node_modules/kerberos/build'
npm ERR! CXX(target) Release/obj.target/kerberos/src/kerberos.o
npm ERR! make: Leaving directory '/home/nico/Desktop/myself/my-projects/trans/node_modules/kerberos/build'
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#7.1.2
npm ERR! gyp info using node#15.12.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.8.6 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/home/nico/.nvm/versions/node/v15.12.0/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 '/home/nico/Desktop/myself/my-projects/trans/node_modules/kerberos/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/nico/.nvm/versions/node/v15.12.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/nico/.cache/node-gyp/15.12.0/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=/home/nico/.cache/node-gyp/15.12.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/nico/.nvm/versions/node/v15.12.0/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/nico/.cache/node-gyp/15.12.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/nico/Desktop/myself/my-projects/trans/node_modules/kerberos',
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! In file included from ../src/kerberos_common.h:7,
npm ERR! from ../src/kerberos.h:5,
npm ERR! from ../src/kerberos.cc:1:
npm ERR! ../src/unix/kerberos_gss.h:18:14: fatal error: gssapi/gssapi.h: No such file or directory
npm ERR! 18 | #include <gssapi/gssapi.h>
npm ERR! | ^~~~~~~~~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [kerberos.target.mk:114: Release/obj.target/kerberos/src/kerberos.o] Error 1
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 (/home/nico/.nvm/versions/node/v15.12.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:369:20)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.11.0-7612-generic
npm ERR! gyp ERR! command "/home/nico/.nvm/versions/node/v15.12.0/bin/node" "/home/nico/.nvm/versions/node/v15.12.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/nico/Desktop/myself/my-projects/trans/node_modules/kerberos
npm ERR! gyp ERR! node -v v15.12.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /home/nico/.npm/_logs/2021-04-15T08_14_02_442Z-debug.log
Had the same problem on wsl2 (ubuntu) and volta. Solved by installing:
sudo apt-get install -y build-essential libkrb5-dev
And then:
npm install -g node-gyp make