Categories
JavaScript Answers

How to set Node engine to 8.x or 10.x in package.json?

Spread the love

To set Node engine to 8.x or 10.x in package.json, we set the engines property.

For instance, in package.json, we write

{
  "engines": {
    "node": "^8 || ^10"
  }
}

to add the engines property into the JSON.

We set the Node engine to 8.x or 10.x with ^8 || ^10.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *