Skip to content

6.0.1 functions: Failed to load function definition from source #1618

Closed
@joalzamora

Description

@joalzamora

Related issues

[REQUIRED] Version info

upgrade from ^5.0.1 to ^6.0.1

node:

V10

firebase-functions:
^6.0.1

firebase-tools:

firebase-admin:
11.8.0

[REQUIRED] Test case

I am trying the following example code from the documentation

https://firebase.google.com/docs/functions/http-events?hl=es-419&gen=2nd#node.js

const { onRequest } = require("firebase-functions/v2/https");

exports.sayHello = onRequest(
{ cors: [/firebase.com$/, "flutter.com"] },
(req, res) => {
res.status(200).send("Hello world!");
}
);

[REQUIRED] Steps to reproduce

npm install --save firebase-functions@latest
firebase emulators:start --only functions

functions: Failed to load function definition from source: FirebaseError: Failed to parse build specification

npm install --save [email protected]
firebase emulators:start --only functions

works perfect

[REQUIRED] Expected behavior

works perfect

[REQUIRED] Actual behavior

functions: Failed to load function definition from source: FirebaseError: Failed to parse build specification

Were you able to successfully deploy your functions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions