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
Node version mismatch log possibly incorrect #2791
Comments
I am getting the same error |
@samtstern There seems to be different behavior depending on how firebase tools is installed. If you use the standalone binary it shows the log message but with the npm install method it doesn't. I suspect that the standalone binary is bundled with node 12 (via firepit ?) so when checking what version node firebase tools is running, its using the embedded node (12) instead of the locally installed version? |
@alexkirmse Yes, the standalone binary comes with a version of Node.js bundled. If that version doesn't work for you, please use the npm installation method instead |
@yuchenshi Makes sense. I brought this up specifically with this specific error:
I think the reason there's a mismatch is that the global version comes from the bundled nodejs regardless of what's set in package.json as the engine. With bug reports, it might be interesting to ask how firebase-tools was installed npm or binary. |
I think I'm having a related issue, I'm running the latest version of firebase-tools on Mac, and my system is running Node v16.13.2, but I'm getting the error |
@coffeepostal Did you install firebase-tools via the binary or npm? |
@alexkirmse I installed via npm, and just updated it to the most recent version. I might try reinstalling regardless. |
no solving yet |
I had the same issue my code was not running since it required at least node 16 but running emulators ran with node12. It took me quite a while to figure this out. I think it would be really beneficial for the developer if the message could include the fact that the "host" system node@12 is not really coming from the host but from the binary. |
* Improve Node.js version warning for standalone. Fix #2791. * Add changelog. * Move generic message to else branch. * Update CHANGELOG.md Co-authored-by: Bryan Kendall <bkend@google.com> Co-authored-by: Bryan Kendall <bkend@google.com>
if you use $ which firebase
/Users/thanhle/.nvm/versions/node/v16.17.0/bin/firebase // this is ok if not, you must install firebase-tools: |
I am also getting this warning with the Firebase Emulator. I have a minimal reproduction at https://github.com/jthegedus/firebase-emulator-warning-reproduction with a GitHub Action demonstrating the issue.
The short of it is this:
asdf
and ensure runningnode --version
in a later step produces the version set byasdf
firebase emulators:exec ...
runs and printsThe emulator runs, but I am unsure if the code is actually running in Node 12 or if this is a just a logging and detection error 🤷
Originally posted by @jthegedus in #1489 (comment)
The text was updated successfully, but these errors were encountered: