Zorgan
Zorgan

Reputation: 9123

Firebase not updating to Node 12

Following the instructions here:

https://firebase.google.com/docs/functions/manage-functions#upgrade-node10

I have already changed my package.json engine to 12:

"engines": {
    "node": "12"
},

and my Firebase CLI version is:

firebase -V
9.5.0

However even after deploying functions it says I am still on Node 10:

node -v
v10.16.0

Any idea what the problem is?

Upvotes: 1

Views: 1723

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317467

The node found in your command line doesn't have anything to do with the config for your firebase CLI in package.json. Changing package.json does not affect your node installation in any way. If you are working with Cloud Functions, the only thing that happens when you change "engines" is the target version of node used by the cloud service (not your machine) after you deploy your functions.

If you want to update the node version on your machine, you will have to do that independently of the Firebase CLI. You will need to follow whatever instructions are relevant for your machine to do that (apt? homebrew? nvm? we don't know) - Firebase will not be able to help.

Upvotes: 2

Related Questions