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

firebase emulator ignores engines.node property for functions and emulator:exec #3824

Closed
modosc opened this issue Oct 13, 2021 · 6 comments
Closed

Comments

@modosc
Copy link

modosc commented Oct 13, 2021

the firebase emulator seems to ignore engines.node property and always uses node 12. i think this has also been mentioned tangentially in these issues:

#2791
https://github.com/firebase/firebase-tools/issues/3296
#1489

[REQUIRED] Environment info

firebase-tools: 9.19.0

Platform: macOS

[REQUIRED] Test case

https://github.com/modosc/firebase-repro

[REQUIRED] Steps to reproduce

clone the above repo and follow the instructions in the README.

[REQUIRED] Expected behavior

the version of node specified in the engines.node property of package.json should be used for functions and when running emulator:exec

[REQUIRED] Actual behavior

node 12 is always used

@abeisgoat
Copy link
Contributor

It uses whatever is installed on your machine! If you'd like you can change your npm version with nvm.

@modosc
Copy link
Author

modosc commented Nov 8, 2021

@abeisgoat can you pease double-check this is the case when you run my repro case? i do not have node 12 installed via nvm or anything else, it seems like it's coming from firebase-tools

@modosc
Copy link
Author

modosc commented Nov 8, 2021

also note that i'm not asking for node 12 in my config - firebase-tools are ignoring the version i request.

@deckchairlabs
Copy link

Yeah I'm also having this issue. There is definitely no other node version installed, I'm using a VSCode devcontainer "16-bullseye" and the only additional "global" package I'm installing is firebase-tools.

@lduivenbode
Copy link

@modosc @deckchairlabs I've had the same issue and just solved it by moving away from the standalone version of firebase-tools to the npm installed version. Not sure if this helps your scenario, but it appears the standalone version is shipped with Node v12.x which was causing my code with optional chaining to fail.

@modosc
Copy link
Author

modosc commented Mar 21, 2022

i worked around this by using cloud functions directly instead of via firebase. just disappointed that this was closed with very little comment after i spent the time to publish an example repo which demonstrates the problem.

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

4 participants