Home > Blockchain >  Node js Engine not upgrading for firebase function node compatibility
Node js Engine not upgrading for firebase function node compatibility

Time:06-14

First failed

Here is the package.json

 "engines": {
        "node": "8.0.0"
      },

Error: package.json in functions directory has an engines field which is unsupported. Valid choices are: {"node": 10|12|14|16}

Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI. Existing Node.js 8 functions will stop executing at a future date. Update existing functions to Node.js 10 or greater as soon as possible.

I also try to upgrade the engine but getting this:

 "engines": {
    "node": "10.0.0"
  },

then:

 npm install

then:

 firebase deploy --only functions

Again getting this error:

Error: package.json in functions directory has an engines field which is unsupported. Valid choices are: {"node": 10|12|14|16}

Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI. Existing Node.js 8 functions will stop executing at a future date. Update existing functions to Node.js 10 or greater as soon as possible.

CodePudding user response:

The error message is saying that you need to provide either "10" or "12" or "14" or "16". It should not contain dots.

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

I suggest reviewing the documentation as well.

  • Related