3
votes

I'm using Firebase Hosting and Cloud Functions. When I execute firebase serve --only functions I got this error :

Cannot start emulator. Error: Cannot find module '/usr/local/lib/node_modules/firebase-tools/node_modules/grpc/src/node/extension_binary/node-v57-darwin-x64-unknown/grpc_node.node'

I installed all dependencies required like firebase-tools. I used this tutorial

Any ideas?

1
Are you sure that npm install -g firebase-tools completed successfully? - Doug Stevenson
Yes i did it many times - Rockers23
It didn't work in local but when I deploy it, it works. Thanks - Rockers23

1 Answers

4
votes

The same issue with me.

You need to change your Node to v6.14.0. This is the version that will be running your code in Cloud Functions environment, please check here.

When you change it, delete node_modules folder and run npm install.