-
Notifications
You must be signed in to change notification settings - Fork 950
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
Version 13.7.0 now requires manually adding "runtime" configuration in firebase.json #6965
Comments
I think this also applies to nodejs: I just just upgraded (npm i -g firebase-tools) and started receiving: functions: Your requested "node" version "20" doesn't match your global version "18". Using node@18 from host. even though I have node version 18 in package.json by setting functions: { runtime: "nodejs18" } in firebase.json it stopped giving the warning. |
Hey @vitoras, thanks for the thorough report as well as for sharing your observations, and thanks @amfc for the additional information. I was able to reproduce the issue. It looks like both Node.js and Python runtimes are affected here. As a workaround for those who also encounter this issue, please specify the |
Yeah, this idea was raised in this issue, but maybe they overlooked that impact. |
Today's release of the CLI fixes the issue. |
Thanks a lot, now the emulators are working as before! |
[REQUIRED] Environment info
firebase-tools:
13.7.0
Platform:
macOS
Sonoma 14.4.1
[REQUIRED] Test case
Right after upgrading to firebase-tools v13.7.0, the emulators started showing the error
Trying to construct a python runtime delegate for runtime nodejs20
on start. I'm testing a function on Python 3.12, and I noticed it works when I add"runtime": "python312"
on firebase.json as per the documentation.But this was never required before.
[REQUIRED] Steps to reproduce
firebase init
, choosing "Functions" and "Emulators" as features and Python as language. Using an existing project or a new one is irrelevant, but everything else can be left as default in the rest of the process;firebase emulators:start
after firebase finished creating the function will give the aforementioned error message;"runtime": "python312"
on firebase.json;firebase emulators:start
again and then it will load your function correctly.Here are some evidences of the fail case without the runtime info on firebase.json, and the success case after I added it:
No runtime on firebase.json (out of the box)
With runtime on firebase.json (manually added)
[REQUIRED] Expected behavior
I noticed the runtime validation was just introduced in this line from this commit, but maybe it would be reasonable if the runtime config could be either automatically inferred from
firebase init
when we select the function language, or at least prompted to be selected by ourselves from the list of supported runtimes.In any case, not everybody is expected to know right away that they have to manually add this information on firebase.json, let alone find a Stackoverflow answer for a newly created error message.
[REQUIRED] Actual behavior
Running
firebase:emulators start --debug
gives the following log at the end:The text was updated successfully, but these errors were encountered: