Firebase-tools: firebase serve --only functions : functions: Cannot start emulator Error: Cannot find module grpc_node.node

Created on 5 Dec 2017  路  2Comments  路  Source: firebase/firebase-tools

Windows 10 Pro
on VS Code

npm --version 5.5.1
node --version v8.9.1
firebase serve --only functions

=== Serving from 'C:\Users\xxx\OneDrive\Documents\GitHub\xxx'...

!  functions: Cannot start emulator. Error: Cannot find module 'C:\Users\xxxx\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64\grpc_node.node'

I tried to reinstall grpc:

npm install -g grpc --allow-root --unsafe

and I did before:
npm install --save firebase-functions@latest firebase-admin

Most helpful comment

npm uninstall -g firebase-tools

All 2 comments

npm uninstall -g firebase-tools

Changing NPM's global directory (and reinstall any global modules, i.e. npm install -g firebase-tools) finally solved it for me (option 2 here, https://docs.npmjs.com/getting-started/fixing-npm-permissions).

Running mac, high sierra 10.13.2

Was this page helpful?
0 / 5 - 0 ratings