quickstart-nodejs icon indicating copy to clipboard operation
quickstart-nodejs copied to clipboard

Return Error when try to run node-pre-gyp

Open jairorudas opened this issue 6 years ago • 6 comments

 [email protected] install /mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error self signed certificate in certificate chain
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: self signed certificate in certificate chain
gyp ERR! stack     at TLSSocket.onConnectSecure (_tls_wrap.js:1058:34)
gyp ERR! stack     at TLSSocket.emit (events.js:198:13)
gyp ERR! stack     at TLSSocket._finishInit (_tls_wrap.js:636:8)
gyp ERR! System Linux 4.4.0-43-Microsoft
gyp ERR! command "/home/jairorudas/.nvm/versions/node/v10.16.3/bin/node" "/home/jairorudas/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/jairorudas/.nvm/versions/node/v10.16.3/bin/node /home/jairorudas/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/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 4.4.0-43-Microsoft
node-pre-gyp ERR! command "/home/jairorudas/.nvm/versions/node/v10.16.3/bin/node" "/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute '/home/jairorudas/.nvm/versions/node/v10.16.3/bin/node /home/jairorudas/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/mnt/c/Users/500401/Documents/firebase/quickstart-nodejs/firestore-emulator/javascript-quickstart/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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:

jairorudas avatar Dec 12 '19 13:12 jairorudas

I installed npm install node-pre-gyp -g on the root user.then tried installing npm i firebase again

Edebo avatar Feb 29 '20 21:02 Edebo

and? did it fix the problem?

jamesradford avatar Mar 16 '20 20:03 jamesradford

gyp ERR! stack Error: self signed certificate in certificate chain

seems like an issue with your SSL certificates. Is npm able to install anything on your machine (e.g., can you try npm install lodash and see if that also throws the error)? Are you on a network behind a corporate firewall?

ryanpbrewster avatar Mar 16 '20 20:03 ryanpbrewster

i was behind a firewall but I get the same error with or without it

jamesradford avatar Mar 16 '20 21:03 jamesradford

i also have this issue

meerkat-citronella avatar Apr 30 '20 02:04 meerkat-citronella

I was able to get it to work using node v8. Won't work with v10/v12.

I did see the certificate chain issue, but it was because I was using the wrong configuration data for the config.js file, which went away when I defined it along with serviceAccountKeys.json.

theogravity avatar Jun 08 '20 02:06 theogravity