Firebase-tools: Requested Node 8 does not match with my Node 12

Created on 10 Jul 2019  Â·  8Comments  Â·  Source: firebase/firebase-tools

[REQUIRED] Environment info


firebase-tools: 7.0.2


Platform: macOS

[REQUIRED] Test case:

run firebase serve on terminal

[REQUIRED] Steps to reproduce:

  1. use the source code from https://angulardart.dev/guide/forms#give-visual-feedback-based-on-control-state

  2. follow steps on https://console.firebase.google.com/u/0/project/icasaa-d46fe/overview up to firebase init, then do firebase serve

[REQUIRED] Expected behavior:

no issues

[REQUIRED] Actual behavior:

Your requested "node" version "8" doesn't match your global version "12"

Most helpful comment

This is expected and just a warning to let you know that you've set {engines: {node: 8}} in functions/package.json. If you're concerned, you can use nvm to install an older version of Node, but realistically it probably wont matter.

All 8 comments

This issue does not seem to follow the issue template. Make sure you provide all the required information.

This is expected and just a warning to let you know that you've set {engines: {node: 8}} in functions/package.json. If you're concerned, you can use nvm to install an older version of Node, but realistically it probably wont matter.

Thanks for the tip, Abe! I made the change to "node": "12", however, I still get:

Daves-MBP:forms dave$ firebase serve

=== Serving from '/Users/dave/WebstormProjects/forms'...

✔  functions: Using node@12 from host.
i  hosting: Serving hosting files from: build/web
✔  hosting: Local server: http://localhost:5000
✔  functions: Emulator started at http://localhost:5001
i  functions: Watching "/Users/dave/WebstormProjects/forms/functions" for Cloud Functions...

Error: An unexpected error has occurred.

Having trouble? Try again or contact support with contents of firebase-debug.log
Daves-MBP:forms dave$ 

Sorry I think Abe meant for you to downgrade to either Node 8 or 10 not
upgrade to 12. Firebase does not yet support Node 12.

On Wed, Jul 10, 2019, 5:06 PM Henry Poit notifications@github.com wrote:

Thanks for the tip, Abe! I made the change to "node": "12", however, I
still get:

Daves-MBP:forms dave$ firebase serve

=== Serving from '/Users/dave/WebstormProjects/forms'...

✔ functions: Using node@12 from host.

i hosting: Serving hosting files from: build/web

✔ hosting: Local server: http://localhost:5000

✔ functions: Emulator started at http://localhost:5001

i functions: Watching "/Users/dave/WebstormProjects/forms/functions" for Cloud Functions...

Error: An unexpected error has occurred.

Having trouble? Try again or contact support with contents of firebase-debug.log

Daves-MBP:forms dave$

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/1489?email_source=notifications&email_token=ACATB2XOZYK5QZQW4TYIIXTP6Z2OPA5CNFSM4H74GJB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZVC4DY#issuecomment-510275087,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACATB2V4LPPWGVOBTFZ4VVLP6Z2OPANCNFSM4H74GJBQ
.

Using Nvm to change the version of node has a solution

I am using n and have node set to 8. Still, I get this warning message

@abeisgoat I'm having the same issue trying to run version 10 inside a docker container with only node 10. It throws this at me

Your requested "node" version "10" doesn't match your global version "12"

My package.json looks like:

{
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "engines": {
    "node": "10"
  },
  ...
}

The project currently is running on node 8 - I had to give up trying to upgrade to node 10 since I thought that my nvm wasn't working. Now I decided to try to do it in a node 10 container and I see that it's not my nvm that was playing with me.

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:

  • set Node version with asdf and ensure running node --version in a later step produces the version set by asdf
  • firebase emulators:exec ... runs and prints
    âš  Your requested "node" version "10" doesn't match your global version "12"
  • Node 12.19.0 is the default for the GitHub Action runner I am using (ubuntu-latest as seen here - https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md)

The 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 :shrug:

Was this page helpful?
0 / 5 - 0 ratings