Error as below:
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:
npm ERR! /root/.npm/_logs/2019-10-09T11_59_21_558Z-debug.log
Task quited with error: Task end with error: Error: Command failed: npm --registry=http://r.npm.oa.com install --production In file included from ../deps/grpc/third_party/upb/upb/msg.h:14:0, from ../deps/grpc/third_party/upb/upb/generated_util.h:10, from ../deps/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h:12, from ../deps/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.h:29, from ../deps/grpc/src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h:26, from ../deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.h:26, from ../deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc:21: ../deps/grpc/third_party/upb/upb/upb.h:27:28: fatal error: upb/port_def.inc: No such file or directory compilation terminated. make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/security/credentials/alts/alts_credentials.o] Error 1 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:262:23) 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.107-1-tlinux2-0048 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" "--library=static_library" "--module=~/dataServer/dataServer/src/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=~/dataServer/dataServer/src/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 ~/dataServer/dataServer/src/node_modules/grpc gyp ERR! node -v v10.16.0 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 '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=~/dataServer/dataServer/src/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=~/dataServer/dataServer/src/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. (~/dataServer/dataServer/src/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 3.10.107-1-tlinux2-0048 node-pre-gyp ERR! command "/usr/local/bin/node" "~/dataServer/dataServer/src/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library" node-pre-gyp ERR! cwd ~/dataServer/dataServer/src/node_modules/grpc node-pre-gyp ERR! node -v v10.16.0 node-pre-gyp ERR! node-pre-gyp -v v0.13.0 node-pre-gyp ERR! not ok 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: npm ERR! /root/.npm/_logs/2019-10-09T11_59_21_558Z-debug.log (2)
dependency tree like below:
โ DataServer git:(master) โ npm ls grpc
[email protected] ~/DataServer
โโโฌ @lag/[email protected]
โโโฌ [email protected]
โโโฌ [email protected]
โโโ [email protected]
Fixed it after degrading to "grpc": "1.23.3"
"dependencies": {
...
"grpc": "1.23.3",
...
}
โ DataServer git:(master) โ npm ls grpc
[email protected] ~/DataServer
โโโฌ @lag/[email protected]
โ โโโฌ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected] deduped
โโโ [email protected]
I got similar error for installing [email protected] during npm install --save firebase.
I just upgrade NodeJS version from v8* to latest v10 and problem solved.
I got similar error for installing
[email protected]duringnpm install --save firebase.
I just upgrade NodeJS version from v8* to latest v10 and problem solved.
@nuri-engin I got this error on NodeJS version v10.16.0.
Maybe a bug has occurred since version [email protected].
any updates?
I got similar error for npm install --save firebase
Linux 4.4.0-101-generic
node v11.12.0
npm v6.7.0
I got same error when tried npm install
My local enviroment is
Who know how to solve this error ???
Same issue on my side while installing latest Firebase ...
same issue on my end and its failing on my heroku build.
I fixed this error by downgrading my node version from the latest (13.1.0) to 12.13.0
This error is gone for me without up/downgrading anything
I bet it's something about some bundles downloaded while it installs,
so it's basically an infrastructure issue.
Any other solutions? I'm still facing this issue.
I have node v12.13.0
downgraded dependencies of grpc @1.23.3
This happened for me as well after upgrading to the latest firebase-tools
Any updates, same issue
node version 10.17.0 and version 12.13.1
:(
Same issue. Just use Yarn
Same issue with [email protected]... downgraded to [email protected] but still getting the error
Delete the old node_modules and package.lock.json and then install the latest version for firebase. Hope this would help you. :)
Same issue with node v12.9.1
Having issue only in google cloud build during integration tests. As a temporary solution skip test.
Same issue with node v13.5
Delete the old node_modules and package.lock.json and then install the latest version for firebase. Hope this would help you. :)
Done it several times. Couldn't find the solution :disappointed:
I have used Yarn instead.
In the folder of my package, where the error was occurring when using npm link
I just deleted the node_modules and package.lock.json and did the following steps:
yarn
yarn build
then
yarn link
all of it worked well.
was having trouble with Firebase cuz firebase needs grpc, so I went to package.json and updated firebase version to the current latest version "7.7.0".
Yarn install and I don't see this error anymore
same issue no solution worked
I fixed this error by using node v8.17.0
Same issue with [email protected] [email protected]
Any updates on this issue?
I try to cejecutar hyper fabric 1.4.4 and I have tried several versions of npm and node recommended by the system but the grpc is a problem. at the time of mounting the fabcar npm install the following error comes up
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script.
I also update and this error comes out:
npm install --save firebase
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! spawn ENOENT
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.
help please!
Downgrade the version of Node js
I found that the problem was that the package request was missing.
Installing it before installing grpc fixed my issues.
If you have a package depending on grpc, install request first.
yarn add request
yarn add grpc
A colleague mentioned that the package "spike" is used if request is not available and that doesn't play nice with the company proxy. Dunno if that's actually the problem, but adding request did fix the issue.
Downgrade the version of Node js
This worked for me.
Mac OS Catalina and react-native project
Delete the old node_modules and package.lock.json and then install the latest version for firebase. Hope this would help you. :)
Done it several times. Couldn't find the solution ๐
work for me..
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
node_modules directoryrm -rfv package-lock.json node_modules
firebasenpm install --save-exact --save firebase@latest
at the time of writing this, the latest version of firebase was 7.10.0
npm audit fix
npm install
It worked for me with this combination:
node version: v13.7.0
npm version: 6.13.6
hth anyone who is still struggling...
reymalahay...saved my life.
node version: 13.5.0
npm version: 6.13.4
It worked for me!
Downgrade the version of Node js
@JanuaryThomas Thank you! It did work for me :)
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
- Remove the lock file and the
node_modulesdirectoryrm -rfv package-lock.json node_modules
- get the latest version of
firebasenpm install --save-exact --save firebase@latestat the time of writing this, the latest version of
firebasewas7.10.0
- check for vulnerabilities
npm audit fix
- then run install
npm installIt worked for me with this combination:
node version: v13.7.0 npm version: 6.13.6hth anyone who is still struggling...
Good work around
@reymalahay
Thank you for pointing the way to the exit from today's visit to Dependency Hell
I am following the grpc/grpc-web Hello World example.
When I need to npm install grpc, I have the same error with node-pre-gyp. I have tried the suggested changes in grpc, Node, and npm versions without any luck.
13226 verbose pkgid [email protected]
13227 verbose cwd /home/ubuntu/grpc-web/net/grpc/gateway/examples/helloworld
13228 verbose Linux 4.15.0-96-generic
13229 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
13230 verbose node v13.12.0
13231 verbose npm v6.14.4
13232 error code ELIFECYCLE
13233 error errno 6
13234 error [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
13234 error Exit status 6
13235 error Failed at the [email protected] install script.
13235 error This is probably not a problem with npm. There is likely additional logging output above.
I also found another user having the same issue on StackOverflow.
Any suggestions? I'm on Ubuntu 18.04 and behind a corporate proxy, if that makes a difference.
@isabelgk
do an ls -l to see if you have a package-lock.json file. if you do, delete it then run npm install again.
btw, i cloned the example and ran npm install; it works without any changes.
hth
I am following the
grpc/grpc-webHello World example.When I need to
npm installgrpc, I have the same error withnode-pre-gyp. I have tried the suggested changes in grpc, Node, and npm versions without any luck.13226 verbose pkgid [email protected] 13227 verbose cwd /home/ubuntu/grpc-web/net/grpc/gateway/examples/helloworld 13228 verbose Linux 4.15.0-96-generic 13229 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" 13230 verbose node v13.12.0 13231 verbose npm v6.14.4 13232 error code ELIFECYCLE 13233 error errno 6 13234 error [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library` 13234 error Exit status 6 13235 error Failed at the [email protected] install script. 13235 error This is probably not a problem with npm. There is likely additional logging output above.I also found another user having the same issue on StackOverflow.
Any suggestions? I'm on Ubuntu 18.04 and behind a corporate proxy, if that makes a difference.
I found that the problem was that the package
requestwas missing.
Installing it before installing grpc fixed my issues.
If you have a package depending ongrpc, installrequestfirst.
yarn add request
yarn add grpcA colleague mentioned that the package "spike" is used if request is not available and that doesn't play nice with the company proxy. Dunno if that's actually the problem, but adding
requestdid fix the issue.
This solution is worked for me
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
- Remove the lock file and the
node_modulesdirectoryrm -rfv package-lock.json node_modules
- get the latest version of
firebasenpm install --save-exact --save firebase@latestat the time of writing this, the latest version of
firebasewas7.10.0
- check for vulnerabilities
npm audit fix
- then run install
npm installIt worked for me with this combination:
node version: v13.7.0 npm version: 6.13.6hth anyone who is still struggling...
This solution worked for me. I used yarn though.
node version: v13.2.0
yarn version: 1.22.4
I fixed this error by downgrading my node version from the latest (13.1.0) to 12.13.0
Downgrading also worked for me.
I have the same issue with Linux 18.04 and node 14.0.0
It seems it can't find the tar file for linux 64-bit arch
Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.20.2/node-v83-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, glibc) (falling back to source compile with node
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
- Remove the lock file and the
node_modulesdirectoryrm -rfv package-lock.json node_modules
- get the latest version of
firebasenpm install --save-exact --save firebase@latestat the time of writing this, the latest version of
firebasewas7.10.0
- check for vulnerabilities
npm audit fix
- then run install
npm installIt worked for me with this combination:
node version: v13.7.0 npm version: 6.13.6hth anyone who is still struggling...
worked. thankz
I found that the problem was that the package
requestwas missing.
Installing it before installing grpc fixed my issues.
If you have a package depending ongrpc, installrequestfirst.
yarn add request
yarn add grpc
A colleague mentioned that the package "spike" is used if request is not available and that doesn't play nice with the company proxy. Dunno if that's actually the problem, but addingrequestdid fix the issue.This solution is worked for me
This Worked for me.... thank you
I found that the problem was that the package
requestwas missing.
Installing it before installing grpc fixed my issues.
If you have a package depending ongrpc, installrequestfirst.
yarn add request
yarn add grpc
A colleague mentioned that the package "spike" is used if request is not available and that doesn't play nice with the company proxy. Dunno if that's actually the problem, but addingrequestdid fix the issue.This solution is worked for me
This Worked for me.... thank you
Yes this one worked for me to solve heroku failed build .. thank you
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
1. Remove the lock file and the `node_modules` directoryrm -rfv package-lock.json node_modules1. get the latest version of `firebase`npm install --save-exact --save firebase@latestat the time of writing this, the latest version of
firebasewas7.10.01. check for vulnerabilitiesnpm audit fix1. then run installnpm installIt worked for me with this combination:
node version: v13.7.0 npm version: 6.13.6hth anyone who is still struggling.
thanks bro
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
- Remove the lock file and the
node_modulesdirectoryrm -rfv package-lock.json node_modules
- get the latest version of
firebasenpm install --save-exact --save firebase@latestat the time of writing this, the latest version of
firebasewas7.10.0
- check for vulnerabilities
npm audit fix
- then run install
npm installIt worked for me with this combination:
node version: v13.7.0 npm version: 6.13.6hth anyone who is still struggling...
Great, this worked. Thanks
Fixed downgrade to Node LTS last version 12.18.2
Delete the old node_modules and package.lock.json and then install the latest version for firebase. Hope this would help you. :)
This is working well for me :) ๐
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
- Remove the lock file and the
node_modulesdirectoryrm -rfv package-lock.json node_modules
- get the latest version of
firebasenpm install --save-exact --save firebase@latestat the time of writing this, the latest version of
firebasewas7.10.0
- check for vulnerabilities
npm audit fix
- then run install
npm installIt worked for me with this combination:
node version: v13.7.0 npm version: 6.13.6hth anyone who is still struggling...
This really works
In package.json firebase version fixed to 7.5.2 "firebase": "7.5.2". I set it to be updated to the latest version "firebase": "^7.5.2" but before doing that I removed the node_modules folder and package-lock.json. Now get rid of the error.
Delete the old node_modules and package.lock.json and then install the latest version for firebase. Hope this would help you. :)
This worked for me too! Thank you so mucho!
node version: v12.18.3
npm version: 6.14.6
was having trouble with Firebase cuz firebase needs grpc, so I went to package.json and updated firebase version to the current latest version "7.7.0".
Yarn install and I don't see this error anymore
this worked for me. I also removed (before) node-pre-gryp and then updated the firebase version
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
- Remove the lock file and the
node_modulesdirectoryrm -rfv package-lock.json node_modules
- get the latest version of
firebasenpm install --save-exact --save firebase@latestat the time of writing this, the latest version of
firebasewas7.10.0
- check for vulnerabilities
npm audit fix
- then run install
npm installIt worked for me with this combination:
node version: v13.7.0 npm version: 6.13.6hth anyone who is still struggling...
It worked for me
In
package.jsonfirebase version fixed to 7.5.2"firebase": "7.5.2". I set it to be updated to the latest version"firebase": "^7.5.2"but before doing that I removed thenode_modulesfolder andpackage-lock.json. Now get rid of the error.
This worked for me as well and I didn't even have to remove node_modules or package-lock.json.
Most helpful comment
First off, please do not upgrade/ downgrade your global environment libraries simply because a single library refuses to play nicely, save that as a super-last resort...
Try this:
node_modulesdirectoryfirebaseat the time of writing this, the latest version of
firebasewas7.10.0It worked for me with this combination:
hth anyone who is still struggling...