[REQUIRED] Environment info
firebase-tools: 15.26.0 (SEA preview build)
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
- Run
firebase init functions --project demo-project
✔ What language would you like to use to write Cloud Functions? JavaScript
✔ Do you want to use ESLint to catch probable bugs and enforce style? No
✔ Wrote functions/package.json
✔ Wrote functions/index.js
✔ Wrote functions/.gitignore
✔ Do you want to install dependencies with npm now? Yes
- Update
functions/index.js
const { onRequest } = require("firebase-functions/https");
const logger = require("firebase-functions/logger");
exports.helloWorld = onRequest((request, response) => {
logger.info("Hello logs!", { structuredData: true });
response.send("Hello from Firebase!");
});
- Run
firebase emulators:start --project demo-project
- Open
http://127.0.0.1:5001/demo-project/us-central1/helloWorld on a browser
[REQUIRED] Expected behavior
There shouldn't be any errors when invoking functions on the Functions Emulator
[REQUIRED] Actual behavior
Functions Emulator shows these errors
> Error: /Users/USER/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/emulator/functionsEmulatorRuntime is not a Firebase command
⬢ functions: Failed to handle request for function us-central1-helloWorld
⬢ functions: Failed to start functions in /Users/USER/Desktop/firebase-tools/node-sea-test/func-emulator/functions: Failed to load function.
[REQUIRED] Environment info
firebase-tools: 15.26.0 (SEA preview build)
Platform: macOS
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
firebase init functions --project demo-projectfunctions/index.jsfirebase emulators:start --project demo-projecthttp://127.0.0.1:5001/demo-project/us-central1/helloWorldon a browser[REQUIRED] Expected behavior
There shouldn't be any errors when invoking functions on the Functions Emulator
[REQUIRED] Actual behavior
Functions Emulator shows these errors