npm install stuck on reify grpc - node.js

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

Related

Problems installing argon2 in a project with npm

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

Angular build fails with command sh -c node-pre-gyp install --fallback-to-build --library=static_library

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

Unable to build #tensorflow/tfjs-node

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.

Cannot install npm packages in debian google cloud platform

I am trying to run my bot using google cloud and discord.js. But when I install npm packages it shows up with a lot of errors. I am a real newbie with google cloud and currently using debian 10 on GCP. Here is the error code. On internet I didn't find a possible solution.
I think the problem is with nodegit or node-pre-gyp. Can anyone help me pls?
npm WARN deprecated dblapi.js#2.4.1: Module is no longer maintained
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 snekfetch#4.0.4: use node-fetch instead
npm WARN deprecated canvas-constructor#3.2.0: Discontinued Support: please update to latest version
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.13.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 WARN deprecated discord.js#12.5.3: no longer supported
npm WARN deprecated node-opus#0.3.3: This project is unmaintained. See #discordjs/opus for an alternative.
npm ERR! code 1
npm ERR! path /home/info/Fab/node_modules/nodegit
npm ERR! command failed
npm ERR! command sh -c node lifecycleScripts/preinstall && node lifecycleScripts/install
npm ERR! [nodegit] Running pre-install script
npm ERR! [nodegit] Running install script
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/info/Fab/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/home/info/Fab/node_modules/nodegit/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp
npm ERR! info it worked if it ends with ok
npm ERR! node-pre-gyp
npm ERR! info using node-pre-gyp#0.1.0
npm ERR! node-pre-gyp info using
npm ERR! node#16.11.1 | linux | x64
npm ERR! node-pre-gyp WARN
npm ERR! Using request for node-pre-gyp https download
npm ERR! node-pre-gyp
npm ERR! info check checked for "/home/info/Fab/node_modules/nodegit/build/Release/nodegit.node" (not found)
npm ERR! node-pre-gyp
npm ERR! http GET https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp
npm ERR! http 404 https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp
npm ERR! WARN Tried to download(404): https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-linux-x64.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for nodegit#0.27.0 and node#16.11.1 (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://axonodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.27.0-node-v93-linux-x64.tar.gz
npm ERR! gyp
npm ERR!
npm ERR! info it worked if it ends with ok
npm ERR! gyp
npm ERR! info using
npm ERR! node-gyp#8.4.1
npm ERR! gyp
npm ERR! info using
npm ERR! node#16.11.1 | linux | x64
npm ERR! gyp
npm ERR! info ok
npm ERR! gyp
npm ERR!
npm ERR! info
npm ERR!
npm ERR! it worked if it ends with
npm ERR! ok
npm ERR! gyp
npm ERR!
npm ERR! info
npm ERR!
npm ERR! using
npm ERR! node-gyp#8.4.1
npm ERR! gyp
npm ERR!
npm ERR! info
npm ERR!
npm ERR! using
npm ERR! node#16.11.1 | linux | x64
npm ERR! gyp
npm ERR! info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp
npm ERR! info spawn /usr/bin/python3
npm ERR! gyp
npm ERR! 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
npm ERR! spawn args '-f',
npm ERR! gyp info
npm ERR! spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp
npm ERR! info spawn args '/home/info/Fab/node_modules/nodegit/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info
npm ERR! spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp
npm ERR! info spawn args '/root/.cache/node-gyp/16.11.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp
npm ERR! info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.11.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info
npm ERR! spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.11.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/info/Fab/node_modules/nodegit',
npm ERR! gyp
npm ERR! info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp
npm ERR! info spawn args '--no-parallel',
npm ERR! gyp info
npm ERR! spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp
npm ERR! info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args
npm ERR! ]
npm ERR! /bin/sh: 1: krb5-config: not found
npm ERR! gyp: Call to 'krb5-config gssapi --libs' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 4.19.0-17-cloud-amd64
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/info/Fab/node_modules/nodegit/build/Release/nodegit.node" "--module_name=nodegit" "--module_path=/home/info/Fab/node_modules/nodegit/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /home/info/Fab/node_modules/nodegit
npm ERR! gyp ERR! node -v v16.11.1
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 configure --fallback-to-build --module=/home/info/Fab/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/home/info/Fab/node_modules/nodegit/build/Release --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> (/home/info/Fab/node_modules/#discordjs/node-pre-gyp/lib/util/compile.js:72:20)
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 4.19.0-17-cloud-amd64
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/info/Fab/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/info/Fab/node_modules/nodegit
npm ERR! node-pre-gyp ERR! node -v v16.11.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.1.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! [nodegit] ERROR - Could not finish install
npm ERR! [nodegit] ERROR - finished with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-12-07T16_43_17_819Z-debug-0.log

npm installation sqlite3 error on Ubuntu Server

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?

Resources