Cannot start emulator
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'
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?
Ping? Would love to hear back from you or we'll close for inactivity
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/
- [email protected] updated 1 package in 89.04s => firebase serve --only functions
=== Serving from '
⚠ functions: Cannot start emulator. Error: Cannot find module '@google-cloud/functions-emulator/src/config'
Same here. Been this way for a few days. Even after the update today.
@danielsada and @raelmiu Can you try:
npm uninstall -g firebase-tools && npm i -g firebase-tools
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/
node scripts/upgrade-warning`
Then finally, the same error

I'm getting the same error. Have tried uninstalling and reinstalling.
Did anyone got this working ?. Still getting the same error.

Same here. Installed node 6.11, reinstalled tools, still doesn't work.
Can replicate in v3.17.2
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
I tried .3 and .2 and I get the same error :(
Is there any solution for this?
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
I have the same exact issue, tried most given solutions, nothing worked. Anyone got a solution in the meantime?
https://github.com/grpc/grpc/issues/13673
I'm getting the same error
I am not sure what exactly is causing this problem. But here is the working solution for this problem. StackOverflow - Firebase: Cannot start emulator
npm install -g @google-cloud/functions-emulator fixed this for me.
@RyanNewsom didn't solve it for me. Still broken.