firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Cannot start emulator

Open spidi123q opened this issue 9 years ago • 42 comments

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 Dec 01 '17 06:12 spidi123q

Sounds like the emulator may have failed to install when you installed firebase-tools (it's an optional dependency, so it's possible). Could you try re-running npm install -g firebase-tools and inspect the output to confirm @google-cloud/functions-emulator got pulled in with it?

justinrosenthal avatar Dec 01 '17 22:12 justinrosenthal

Ping? Would love to hear back from you or we'll close for inactivity

inlined avatar Dec 11 '17 20:12 inlined

I did the same thing, I installed and reinstalled the modules to no avail.

➜ firebase serve --only functions

=== Serving from ''...

⚠ functions: Cannot start emulator. Error: Cannot find module '@google-cloud/functions-emulator/src/config' ➜ npm install -g firebase-tools npm WARN deprecated [email protected]: Use uuid module instead /home//.npm-global/bin/firebase -> /home//.npm-global/lib/node_modules/firebase-tools/bin/firebase

=== Serving from ''...

⚠ functions: Cannot start emulator. Error: Cannot find module '@google-cloud/functions-emulator/src/config'

danielsada avatar Jan 22 '18 20:01 danielsada

Same here. Been this way for a few days. Even after the update today.

jesper-bylund avatar Jan 23 '18 17:01 jesper-bylund

@danielsada and @raelmiu Can you try:

npm uninstall -g firebase-tools && npm i -g firebase-tools

laurenzlong avatar Jan 23 '18 18:01 laurenzlong

Did it, some of the notable warnings: node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.4.1/node-v59-linux-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v59 ABI) (falling back to source compile with node-gyp) make: Entering directory '/home/danielsada/.npm-global/lib/node_modules/firebase-tools/node_modules/grpc/build' Then

`> @google-cloud/[email protected] postinstall /home//.npm-global/lib/node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator

node scripts/upgrade-warning`

Then finally, the same error

image

danielsada avatar Jan 23 '18 19:01 danielsada

I'm getting the same error. Have tried uninstalling and reinstalling.

1forh avatar Jan 24 '18 23:01 1forh

Did anyone got this working ?. Still getting the same error.

screen shot 2018-01-25 at 12 59 38 pm

miransar avatar Jan 25 '18 07:01 miransar

Same here. Installed node 6.11, reinstalled tools, still doesn't work.

jesper-bylund avatar Jan 25 '18 10:01 jesper-bylund

Can replicate in v3.17.2

danielsada avatar Jan 25 '18 15:01 danielsada

Hi everyone, can you try v3.17.3? @Mir-Ansar yours looks to be a permission error, here's info on how to fix: https://docs.npmjs.com/getting-started/fixing-npm-permissions

laurenzlong avatar Jan 25 '18 17:01 laurenzlong

I tried .3 and .2 and I get the same error :(

danielsada avatar Jan 25 '18 18:01 danielsada

Is there any solution for this?

otnielgomez avatar Jan 26 '18 19:01 otnielgomez

Sorry I can't reproduce the issue, it sounds like it is similar to https://github.com/GoogleCloudPlatform/cloud-functions-emulator/issues/170#issue-278096938. So you may want to +1 that issue.

Other things you can try are:

  • upgrading npm, and then uninstall, reinstall
npm i -g npm
npm unintall -g firebase-tools && npm i -g firebase-tools

laurenzlong avatar Jan 26 '18 22:01 laurenzlong

I have the same exact issue, tried most given solutions, nothing worked. Anyone got a solution in the meantime?

sstottelaar avatar Jan 28 '18 11:01 sstottelaar

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

tonnyavery avatar Jan 28 '18 11:01 tonnyavery

I'm getting the same error

tuguScript avatar Jan 28 '18 23:01 tuguScript

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

dsouzaedison avatar Feb 04 '18 18:02 dsouzaedison

npm install -g @google-cloud/functions-emulator fixed this for me.

RyanNewsom avatar Feb 06 '18 01:02 RyanNewsom

@RyanNewsom didn't solve it for me. Still broken.

jcoder76 avatar Feb 20 '18 21:02 jcoder76