Reputation: 1033
I'm getting a mass of error messages when I try to install node_modules in my project. I've previously installed it successfully, but I'm not sure what I've done wrong to cause all these error messages to be generated now.
Any help to decipher what they mean would be great. Just before this, I did the following install of grpc, which installed v1.14.1:
$ npm install -g grpc@latest
[email protected] install /usr/local/lib/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using needle for node-pre-gyp https download
[grpc] Success: "/usr/local/lib/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" is installed via remote
+ [email protected]
added 85 packages from 48 contributors in 6.344s
so it's curious why node is trying to use v1.10.1 in the following messages:
$ npm i
> [email protected] install /path/to/app/node_modules/fsevents
> node install
[fsevents] Success: "/path/to/app/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
> [email protected] install /path/to/app/node_modules/@firebase/firestore/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
sed: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.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:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /path/to/app/node_modules/@firebase/firestore/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /path/to/app/node_modules/@firebase/firestore/node_modules/grpc
node-pre-gyp ERR! node -v v10.9.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/10.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.oexec install script
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.oinstall script
error: error reading '../deps/grpc/src/core/lib/channel/channel_args.cc'
1 error generated.
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.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:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:239:12)
gyp ERR! System Darwin 17.7.0l: info lifecycle [email protected]~install: Failed to exec install script
gyp ERR! command "/usr/local/Cellar/node/10.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/path/to/app/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /path/to/app/node_modules/@firebase/firestore/node_modules/grpc
gyp ERR! node -v v10.9.0
gyp ERR! node-gyp -v v3.7.0
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! /Users/myfolder/.npm/_logs/2018-09-03T16_54_49_177Z-debug.log
Upvotes: 27
Views: 29444
Reputation: 21506
If you get this today, know that this package has been deprecated:
This package has been deprecated
Author message: This library will not receive further updates other than security fixes. We > recommend using @grpc/grpc-js instead.
It was quite easy to switch to @grpc/grpc-js
, and have fast installs again.
Upvotes: 0
Reputation: 1
Follow the steps given below to resolve this issue,
Solution 1:
Delete the node_modules
folder.
Install firebase
module by the following command
npm install firebase --force
Install the remaining modules.
npm install
Solution 2:
Add the following lines to the package.json
file
"dependencies": {
"firebase": "^5.0.2"
...
},
"resolutions": {
"grpc": "^1.12.0"
}
Upvotes: 0
Reputation: 51
Degrade your node to 10.0.0 and then add the dependency for "grpc": "~1.22.2" with this exact version. And, then do a npm i with command prompt as administrator.
Upvotes: 0
Reputation: 87
I installed windows-build-tools and did an update of the firebase. It worked
Upvotes: 0
Reputation: 391
If you use windows. Try start command as administrator.
Upvotes: 1
Reputation: 1
I had a same problem with [email protected] , I put in package.json "grpc": "~1.22.2" and it solved the problem. Seems like there is a problem with compiling [email protected] and @1.23.1 but on @1.22 it works fine. No
Upvotes: 0
Reputation: 404
I was gone through same problem solved after lot efforts. It is because of npm version is not compatible with gprc version. So we need to update the npm.
1 - npm update
2 - npm install
This solve my issue. Thank you
Upvotes: 2
Reputation: 37
I am having a similar issue. Tried every which thing but no relief :(
~/Documents/dev/node/fb: npm install -save firebase
[email protected] install /Users/hbhagwat001/Documents/dev/node/fb/node_modules/grpc node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error self signed certificate in certificate chain gyp ERR! configure error gyp ERR! stack Error: Command failed: /anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "", line 1 gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
Upvotes: -3
Reputation: 1033
It took a while to find, but the solution that worked for me was:
The ionic serve and build commands now work for ios.
Edit (2018-09-07):
Although the above steps worked temporarily, the grpc 1.10.1 problem came back later. After much more investigation and thanks to a prompt from @murgatroid99, I found the problem was being caused by an old version of firestore in the firebase plugin, which was referencing grpc v1.10.1 in it's package.json.
After I updated firebase to the latest version with:
npm i firebase@latest
it reporting using v1.13.1 and the problem went away.
I hope that helps anyone having the same problem.
Upvotes: 41
Reputation: 20277
The problem here is that gRPC 1.10 is a bit old and does not support Node 10. You can resolve this by either using a newer version of gRPC or an older version of Node.
The error message in the question indicates that the failure occurs when installing gRPC as a dependency of @firebase/firestore
. You may need to upgrade your dependency on that package to get a newer version of gRPC.
Upvotes: 6
Reputation: 167
What is your node version? You can check it by "node -v", mine was v10.9.0 and I had this error, but when I downgrade to v8.11.4 downloading from this site "https://nodejs.org/en/" and made npm update - it works.
Upvotes: 8