Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to migrate firebase functions to node 10 runtime

When i update engine to field to 8 in package.json it works fine. But when i move it to 10 it throws error on deploying functions

package.json

 "engines": {
    "node": "10"
  }

firebase deploy

Error:

package.json in functions directory has an engines field which is unsupported. The only valid choices are: {"node": "8"} and {"node": "6"}.

like image 916
Prateek Kapoor Avatar asked Apr 19 '19 04:04

Prateek Kapoor


2 Answers

At the time of this answer, Node 10 is not currently supported by Cloud Functions using the Firebase CLI. It will be supported in the future.

EDIT

As of May 2, 2019, node 10 is a supported runtime when deploying with the Firebase CLI.

like image 132
Doug Stevenson Avatar answered Oct 19 '22 04:10

Doug Stevenson


Directly from the firebase docs here is reads:

Change the engines value from 8 to 10 in the package.json file that was created in your functions/ directory during initialization.

(this is locally on your computer)

... the entry should look like this: "engines": {"node": "10"}

Redeploy using your Firebase CLI (v8.1+) and you should be good to go.

like image 39
lemonshark12 Avatar answered Sep 21 '22 05:09

lemonshark12