Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module '.../lib/providers/https

I try to run the functions emulator with firebase emulators:start and get an error:

❯ firebase emulators:start
i  emulators: Starting emulators: functions
⚠  functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: auth, firestore, database, hosting, pubsub, storage
✔  functions: Using node@14 from host.
i  ui: Emulator UI logging to ui-debug.log
i  functions: Watching "/Users/inlined/git/junkdrawer/functions" for Cloud Functions...
⚠  functions: Cannot find module '/Users/inlined/git/junkdrawer/functions/node_modules/firebase-functions/lib/providers/https'
Require stack:
- /Users/inlined/.nvm/versions/node/v14.16.0/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js
⚠  Your function was killed because it raised an unhandled error.
like image 480
Thomas Bouldin Avatar asked Aug 12 '21 01:08

Thomas Bouldin


1 Answers

Sorry for this everyone, it was my fault. In version 3.15.0 and 3.15.1 of the firebase-functions SDK we refactored some of our file hierarchy without realizing that the emulator team monkey-patched an undocumented file/function.

The upcoming version 3.15.2 of firebase-tools handles both the old and new path. You can fix the error with:

npm install -g firebase-tools
like image 110
Thomas Bouldin Avatar answered Oct 19 '22 16:10

Thomas Bouldin