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
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With