cloud-functions-emulator icon indicating copy to clipboard operation
cloud-functions-emulator copied to clipboard

Installation error

Open spidi123q opened this issue 7 years ago • 7 comments

when i try install emulator it gives following error

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-fvN/DQEPsCitGtWXIuUG2SYoFcs= integrity checksum failed when using sha1: wanted sha1-fvN/DQEPsCitGtWXIuUG2SYoFcs= but got sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==. (3410 bytes)
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
/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

> [email protected] 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.1/node-v57-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, glibc) (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 Linux 4.4.0-101-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/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-linux-x64/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-linux-x64"
gyp ERR! cwd /usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc
gyp ERR! node -v v8.6.0
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/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-linux-x64/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-linux-x64' (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:125:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:927:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.4.0-101-generic
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.6.0
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/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-linux-x64/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-linux-x64' (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! 
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:

also when i try to run firebase serve --only functions it gives following error and runs only hosting functions: Cannot start emulator. Error: Cannot find module '@google-cloud/functions-emulator/src/config'

spidi123q avatar Nov 30 '17 12:11 spidi123q

Have similar issue with install of cloud functions. Version of node: v8.9.4

ChaossAdept7 avatar Jan 14 '18 00:01 ChaossAdept7

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

> [email protected] 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 [email protected] and [email protected] (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! [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/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.

mixcas avatar Jan 22 '18 22:01 mixcas

https://github.com/grpc/grpc/issues/13673

AAverin avatar Jan 28 '18 11:01 AAverin

Maybe this should help :

cd /usr/local/lib/ sudo npm install @google-cloud/functions-emulator sudo npm install -g @google-cloud/functions-emulator

thollander avatar Jan 28 '18 17:01 thollander

I am not sure what exactly is causing this problem. But here is the working solution. StackOverflow - Firebase: Cannot start emulator

dsouzaedison avatar Feb 04 '18 18:02 dsouzaedison

Any updates here?

It's very discouraging that this issue has been open for over a year without a maintainer acknowledging it.

stephenmathieson avatar Nov 30 '18 19:11 stephenmathieson

The yarn solution worked for me: https://stackoverflow.com/a/52877585/3180309

ghost avatar Mar 13 '19 20:03 ghost