npm ERR! [nodegit] ERROR - finished with error code: 1 (wsl) - node.js

I get this error when I run npm i in wsl, I don't know how to fix it:
npm ERR! gyp ERR! cwd /home/server/RbxJs2016-main/node_modules/nodegit
npm ERR! gyp
npm ERR! ERR! node -v v17.0.0
npm ERR! gyp ERR! node-gyp -v v8.2.0
npm ERR! gyp
npm ERR! ERR! not ok
npm ERR! node-pre-gyp
npm ERR! ERR! build error
npm ERR! node-pre-gyp
npm ERR! 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/server/RbxJs2016-main/node_modules/nodegit/build/Release/nodegit.node --module_name=nodegit --module_path=/home/server/RbxJs2016-main/node_modules/nodegit/build/Release --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/server/RbxJs2016-main/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
npm ERR! at maybeClose (node:internal/child_process:1062:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp
npm ERR! ERR! System Linux 5.10.102.1-microsoft-standard-WSL2
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/server/RbxJs2016-main/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /home/server/RbxJs2016-main/node_modules/nodegit
npm ERR! node-pre-gyp ERR! node -v v17.0.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR!
npm ERR! not ok
npm ERR! [nodegit] ERROR - Could not finish install
npm ERR! [nodegit] ERROR - finished with error code: 1
I've tried several things but it won't work!
Im using WSL Ubuntu 22.04 LTS, and node 16.19.0
the problem seems to come from node-gyp but I don't know how to fix it

Related

Cannot install canvas on npm

I am trying to install canvas on my raspberry pi via npm after successfully installing on my main pc, but now I get a really long error that I don't know how to fix.
Here's the full error:
npm ERR! gyp info spawn args ]
npm ERR! Package pixman-1 was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing `pixman-1.pc'
npm ERR! to the PKG_CONFIG_PATH environment variable
npm ERR! No package 'pixman-1' found
npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 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:261:16)
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.15.32+
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" "--update-binary" "--module=/home/alex/discord-bot/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/home/alex/discord-bot/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /home/alex/discord-bot/node_modules/canvas
npm ERR! gyp ERR! node -v v16.16.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/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --update-binary --module=/home/alex/discord-bot/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/home/alex/discord-bot/node_modules/canvas/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/alex/discord-bot/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:1092: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.15.32+
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/home/alex/discord-bot/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--update-binary"
npm ERR! node-pre-gyp ERR! cwd /home/alex/discord-bot/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v16.16.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/alex/.npm/_logs/2022-08-09T20_08_23_632Z-debug-0.log
I used the command npm install --build-from-source canvas, please can I have help?
Try this before run npm install canvas. It work for me
brew install pkg-config cairo pango libpng jpeg giflib librsvg
Ref : https://flaviocopes.com/fix-node-canvas-error-pre-gyp-macos/
Seems you're missing the 'pixman' dependency. Did you follow the guide to install all the needed dependencies before installing canvas? It requires a bunch of dependencies.
You have to install required dependencies for compiling your system from https://www.npmjs.com/package/canvas
For ubuntu i did
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

npm install bcrypt#5 failed

I'm trying to install bcrypt and it's failing and I don't know why
I'm using npm#8.1.1
and node#v14.17.3
I looked around and couldn't find a solution
this is the error message
npm ERR! code 1 npm ERR! path C:\user\project\node_modules\bcrypt npm
ERR! command failed npm ERR! command C:\windows\system32\cmd.exe /d /s
/c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute
'C:\Program Files\nodejs\node.exe
C:\Users\Isaac\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\user\project\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\user\project\node_modules\bcrypt\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.6
npm ERR! node-pre-gyp info using node#14.17.3 | win32 | x64 npm ERR!
node-pre-gyp info check checked for
"C:\user\project\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node"
(not found) npm ERR! node-pre-gyp http GET
https://github.com/kelektiv/node.bcrypt.js/releases/download/v5.0.1/bcrypt_lib-v5.0.1-napi-v3-win32-x64-unknown.tar.gz
npm ERR! node-pre-gyp ERR! install request to
https://github-releases.githubusercontent.com/611333/2dce3380-7741-11eb-8e53-10fe9e70e497?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211108%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211108T172227Z&X-Amz-Expires=300&X-Amz-Signature=9761816bbd1377deb50f2fa1632743d75dec9aef4f24ef775a4605edddd3dd81&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=611333&response-content-disposition=attachment%3B%20filename%3Dbcrypt_lib-v5.0.1-napi-v3-win32-x64-unknown.tar.gz&response-content-type=application%2Foctet-stream
failed, reason: unable to get local issuer certificate npm ERR!
node-pre-gyp WARN Pre-built binaries not installable for bcrypt#5.0.1
and node#14.17.3 (node-v83 ABI, unknown) (falling back to source
compile with node-gyp) npm ERR! node-pre-gyp WARN Hit error request to
https://github-releases.githubusercontent.com/611333/2dce3380-7741-11eb-8e53-10fe9e70e497?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211108%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211108T172227Z&X-Amz-Expires=300&X-Amz-Signature=9761816bbd1377deb50f2fa1632743d75dec9aef4f24ef775a4605edddd3dd81&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=611333&response-content-disposition=attachment%3B%20filename%3Dbcrypt_lib-v5.0.1-napi-v3-win32-x64-unknown.tar.gz&response-content-type=application%2Foctet-stream
failed, reason: unable to get local issuer certificate 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#14.17.3 | 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.3.0 npm ERR! gyp info using
node#14.17.3 | win32 | x64 npm ERR! gyp info find Python using Python
version 3.9.4 found at
"C:\Users\Isaac\AppData\Local\Programs\Python\Python39\python.exe" npm
ERR! gyp http GET
https://nodejs.org/download/release/v14.17.3/node-v14.17.3-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install npm ERR!
gyp ERR! configure error npm ERR! gyp ERR! stack FetchError: request
to
https://nodejs.org/download/release/v14.17.3/node-v14.17.3-headers.tar.gz
failed, reason: unable to get local issuer certificate npm ERR! gyp
ERR! stack at ClientRequest.
(C:\Users\Isaac\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:110:14)
npm ERR! gyp ERR! stack at ClientRequest.emit (events.js:375:28)
npm ERR! gyp ERR! stack at TLSSocket.socketErrorListener
(_http_client.js:475:9) npm ERR! gyp ERR! stack at TLSSocket.emit
(events.js:387:35) npm ERR! gyp ERR! stack at emitErrorNT
(internal/streams/destroy.js:106:8) npm ERR! gyp ERR! stack at
emitErrorCloseNT (internal/streams/destroy.js:74:3) npm ERR! gyp ERR!
stack at processTicksAndRejections
(internal/process/task_queues.js:82:21) npm ERR! gyp ERR! System
Windows_NT 10.0.18363 npm ERR! gyp ERR! command "C:\Program
Files\nodejs\node.exe"
"C:\Users\Isaac\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js"
"configure" "--fallback-to-build"
"--module=C:\user\project\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node"
"--module_name=bcrypt_lib"
"--module_path=C:\user\project\node_modules\bcrypt\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
C:\user\project\node_modules\bcrypt npm ERR! gyp ERR! node -v v14.17.3
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 'C:\Program Files\nodejs\node.exe
C:\Users\Isaac\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
configure --fallback-to-build
--module=C:\user\project\node_modules\bcrypt\lib\binding\napi-v3\bcrypt_lib.node
--module_name=bcrypt_lib --module_path=C:\user\project\node_modules\bcrypt\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.
(C:\user\project\node_modules#mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit
(events.js:375:28) npm ERR! node-pre-gyp ERR! stack at maybeClose
(internal/child_process.js:1055:16) npm ERR! node-pre-gyp ERR! stack
at Process.ChildProcess._handle.onexit
(internal/child_process.js:288:5) npm ERR! node-pre-gyp ERR! System
Windows_NT 10.0.18363 npm ERR! node-pre-gyp ERR! command "C:\Program
Files\nodejs\node.exe"
"C:\user\project\node_modules\#mapbox\node-pre-gyp\bin\node-pre-gyp"
"install" "--fallback-to-build" npm ERR! node-pre-gyp ERR! cwd
C:\user\project\node_modules\bcrypt npm ERR! node-pre-gyp ERR! node -v
v14.17.3 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.6 npm ERR!
node-pre-gyp ERR! not ok

after update node js 'node-gyp' module not install with npm

When I update Node js in my Linux machine (CentOS by nvm) the modules that have node-gyp and node-pre-gyp are disabled and need to be reinstalled, For example canvas, ursa, ...
i tested this solution:
I think delete this directory and clean the cache of npm is better:
rm -rf ~/.node-gyp/
rm -r node_modules/.bin/;
rm -r build/
npm cache clean
and test
npm uninstall node-gyp
npm install -g node-gyp
and
npm uninstall node-pre-gyp
npm install -g node-pre-gyp
finally:
npm install <your module>
But these two modules go wrong and the installation process is over from package.json. what can i do with this errors?
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/root/.nvm/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 3.10.0-957.21.2.el7.x86_64
gyp ERR! command "/root/.nvm/v10.16.3/bin/node" "/root/.nvm/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/root/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/root/node_modules/canvas/build/Release" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" "--python=python2.7"
gyp ERR! cwd /root/node_modules/canvas
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/root/.nvm/v10.16.3/bin/node /root/.nvm/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/node_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=python2.7' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/root/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 3.10.0-957.21.2.el7.x86_64
node-pre-gyp ERR! command "/root/.nvm/v10.16.3/bin/node" "/root/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/node_modules/canvas
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/root/.nvm/v10.16.3/bin/node /root/.nvm/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/root/node_modules/canvas/build/Release --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=python2.7' (1)
npm WARN PartServer#6.2.0 No description
npm WARN PartServer#6.2.0 license should be a valid SPDX license expression
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! canvas#2.6.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the canvas#2.6.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-17T07_45_58_118Z-debug.log

Not able to execute fabcar demo in Hyperledger

I am tring to execute fabcar example from Hyperledger-fabric where I have created few cars. When I try to execute
node query.js
at ../fabric-samples/fabcar I am getting an error
fabric-client not found
If I execute
npm install
I have node 6.9.0 and npm 3.10.0
I am getting error like this
> grpc#1.2.4 install /home/.../fabric-samples/fabcar/node_modules/grpc
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.2.4/node-v57-linux-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.2.4 and node#8.0.0 (node-v57 ABI) (falling back to source compile with node-gyp)
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.0.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/.../fabric-samples/fabcar/node_modules/grpc/.node-gyp"
make: Entering directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build'
make: *** No rule to make target '../.node-gyp/8.0.0/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/home/.../fabric-samples/fabcar/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.4.0-42-generic
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=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary"
gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
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=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node
--module_name=grpc_node --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:125:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:887:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
node-pre-gyp ERR! System Linux 4.4.0-42-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/home/.../fabric-samples/fabcar/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/.../fabric-samples/fabcar/node_modules/grpc
node-pre-gyp ERR! node -v v8.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.34
node-pre-gyp ERR! not ok
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=/home/.../fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary/grpc_node.node --module_name=grpc_node --module_path=/home/.../fabric-samples/fabcar/node_modules/grpc/src /node/extension_binary' (1)
fabcar#1.0.0 /home/.../fabric-samples/fabcar`-- (empty)
npm WARN fabcar#1.0.0 No repository field.
npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v8.0.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! grpc#1.2.4 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.2.4 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the grpc package
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs grpc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls grpc
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/.../fabric-samples/fabcar/npm-debug.log
npm ERR! code 1
can anyone help me to execute the code
It was solved after deleting directory node_module and then doing
npm install

Issue when installing sqlite3 in node.js

Does anyone know how to fix this issue when running the command "npm install -g triplie"? I also get the same error when installing sqlite3 only.
This is node.js compiled manually, as I can't find a version in apt-get to install.
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at maybeClose (child_process.js:999:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1071:5)
gyp ERR! System Linux 3.15.3-x86_64-linode44
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--name=sqlite3" "--configuration=Release" "--module_name=node_sqlite3" "--version=2.2.4" "--major=2" "--minor=2" "--patch=4" "--runtime=node" "--node_abi=node-v14" "--platform=linux" "--target_platform=linux" "--arch=x64" "--target_arch=x64" "--module_main=./lib/sqlite3" "--host=https://node-sqlite3.s3.amazonaws.com/" "--module_path=/usr/local/lib/node_modules/triplie/node_modules/sqlite3/lib/binding/node-v14-linux-x64" "--remote_path=./Release/" "--package_name=node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz" "--staged_tarball=build/stage/Release/node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz" "--hosted_path=https://node-sqlite3.s3.amazonaws.com/Release/" "--hosted_tarball=https://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz"
gyp ERR! cwd /usr/local/lib/node_modules/triplie/node_modules/sqlite3
gyp ERR! node -v v0.11.14-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=2.2.4 --major=2 --minor=2 --patch=4 --runtime=node --node_abi=node-v14 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://node-sqlite3.s3.amazonaws.com/ --module_path=/usr/local/lib/node_modules/triplie/node_modules/sqlite3/lib/binding/node-v14-linux-x64 --remote_path=./Release/ --package_name=node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz --staged_tarball=build/stage/Release/node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz --hosted_path=https://node-sqlite3.s3.amazonaws.com/Release/ --hosted_tarball=https://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/triplie/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:76:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:999:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1071:5)
node-pre-gyp ERR! System Linux 3.15.3-x86_64-linode44
node-pre-gyp ERR! command "node" "/usr/local/lib/node_modules/triplie/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/triplie/node_modules/sqlite3
node-pre-gyp ERR! node -v v0.11.14-pre
node-pre-gyp ERR! node-pre-gyp -v v0.5.19
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node rebuild --name=sqlite3 --configuration=Release --module_name=node_sqlite3 --version=2.2.4 --major=2 --minor=2 --patch=4 --runtime=node --node_abi=node-v14 --platform=linux --target_platform=linux --arch=x64 --target_arch=x64 --module_main=./lib/sqlite3 --host=https://node-sqlite3.s3.amazonaws.com/ --module_path=/usr/local/lib/node_modules/triplie/node_modules/sqlite3/lib/binding/node-v14-linux-x64 --remote_path=./Release/ --package_name=node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz --staged_tarball=build/stage/Release/node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz --hosted_path=https://node-sqlite3.s3.amazonaws.com/Release/ --hosted_tarball=https://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.2.4-node-v14-linux-x64.tar.gz' (1)
npm ERR! sqlite3#2.2.4 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sqlite3#2.2.4 install script.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls sqlite3
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.15.3-x86_64-linode44
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "triplie"
npm ERR! cwd /root/node
npm ERR! node -v v0.11.14-pre
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/node/npm-debug.log
npm ERR! not ok code 0
I got the same error trying to install sqlite through npm for etherpad-lite. I checked out the 0.12 branch and rebuilt, and npm install sqlite3 ran with no errors. My etherpad is now using an sqlite database, hooray!

Resources