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"}.
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.
Directly from the firebase docs here is reads:
Change the
engines
value from8
to10
in thepackage.json
file that was created in yourfunctions/
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With