Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
joalzamora opened this issue Sep 17, 2024 · 3 comments
Open

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

joalzamora opened this issue Sep 17, 2024 · 3 comments

Comments

@joalzamora
Copy link

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 firebase-functions@5.0.1
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?

@google-oss-bot
Copy link
Collaborator

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@chrisfp
Copy link

chrisfp commented Sep 18, 2024

Did you try to use firebase-tools v13.17.0 and firebase-admin v12.5.0? That made the problem disappear to me

@joalzamora
Copy link
Author

It worked for me to run the command sudo npm install -g firebase-tools at the operating system level, which runs the firebase emulators:start command to update to version 13.17.0, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants