Can't test cloud functions locally, emulator fails to start with TypeError: _onRequestWithOpts is not a function

If you are experiencing this error, run npm install [email protected] in your functions directory.

This will be fixed soon, and you can follow along here: https://github.com/firebase/firebase-tools/issues/1480


I found error in:

node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime.js

line 276:

const _onRequestWithOpts = httpsProvider._onRequestWithOpts;

should be:

const _onRequestWithOpts = httpsProvider._onRequestWithOptions;