I had the a @grpc/grpc-js only works on Node ^8.13.0 || >=10.10.0
error thrown when deploying my cloud functions. I installed nvm
and updated node to 12.13.1 with firebase tools version 7.8.1. I ran npm install again and redeployed my cloud functions and got the following error message thrown:
Error: Error parsing triggers: Cannot find module 'firebase'
Require stack:
/Users/chriscynn/Desktop/pretzly/pretzly/functions/index.js
/usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js
I understand this means the firebase module in the node_modules folder does not exist, which is true. So I entered the npm install firebase
command and at the very bottom I've pasted in entirety what prints out.
Any help would be appreciated, been toiling for the past couple days - clearing, installing, reinstalling, uninstalling, etc - and can't find a glimmer of hope in resolving. I'm fairly new to programming and even worse in understanding CLI.
My current package.json
is...
CLI npm install firebase Error Log
1. [email protected] install /Users/me/Desktop/appName/appName/functions/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 Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
2. Rows of "CXX(target) Release/obj.target..." print out
3. ../ext/channel.cc:292:56: error: too few arguments to function call, expected 2, have 1
int try_to_connect = (int)info[0]->Equals(Nan::True());/Users/me/Library/Caches/node-gyp/12.13.1/include/node/v8.h:2616:3: note: 'Equals' declared here V8_WARN_UNUSED_RESULT Maybe Equals(Local context,
/Users/me/Library/Caches/node-gyp/12.13.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT' define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
1 error generated.
make: *** [Release/obj.target/grpc_node/ext/channel.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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.7.0
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=/Users/me/Desktop/appName/appName/functions/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/me/Desktop/appName/appName/functions/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/me/Desktop/appName/appName/functions/node_modules/grpc
gyp ERR! node -v v12.13.1
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 '/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=/Users/me/Desktop/appName/appName/functions/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/me/Desktop/appName/appName/functions/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/me/Desktop/appName/appName/functions/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/me/Desktop/appName/appName/functions/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/me/Desktop/appName/appName/functions/node_modules/grpc
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
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 --library=static_library --module=/Users/me/Desktop/appName/appName/functions/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/me/Desktop/appName/appName/functions/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
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! Failed at the [email protected] install script.