Open spidi123q opened 6 years ago
Have similar issue with install of cloud functions. Version of node: v8.9.4
Same here. I can't install @google-cloud/functions-emulator
and can't run firebase serve --only functions
.
This is my output:
sudo npm install -g @google-cloud/functions-emulator 1 ↵
Password:
/usr/local/bin/functions -> /usr/local/lib/node_modules/@google-cloud/functions-emulator/bin/functions
/usr/local/bin/functions-emulator -> /usr/local/lib/node_modules/@google-cloud/functions-emulator/bin/functions
> grpc@1.7.2 install /usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(undefined): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.2/node-v57-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.2 and node@8.9.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/build'
gyp ERR! System Darwin 17.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown"
gyp ERR! cwd /usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
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 configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Darwin 17.3.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
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 configure --fallback-to-build --library=static_library --module=/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.7.2 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.7.2 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/cas/.npm/_logs/2018-01-22T21_52_46_383Z-debug.log
Using node: 8.9.4 npm: 5.6.0
Also if i try to install using sudo yarn global add @google-cloud/functions-emulator
it doesn't return any errors but running function
prints a lot of source code from zsh
.
Maybe this should help :
cd /usr/local/lib/
sudo npm install @google-cloud/functions-emulator
sudo npm install -g @google-cloud/functions-emulator
I am not sure what exactly is causing this problem. But here is the working solution. StackOverflow - Firebase: Cannot start emulator
Any updates here?
It's very discouraging that this issue has been open for over a year without a maintainer acknowledging it.
The yarn solution worked for me: https://stackoverflow.com/a/52877585/3180309
when i try install emulator it gives following error
also when i try to run
firebase serve --only functions
it gives following error and runs only hostingfunctions: Cannot start emulator. Error: Cannot find module '@google-cloud/functions-emulator/src/config'