How to know what version of node I need to run a react app?

Viewed 2718

I have a react app, the npm install and npm start operations to run it on node v12.18.2 work perfectly but gives error on node v17.3.0. So how to know what versions of node can i use for the app to run successfully.

1 Answers

The React application has a package.json file and in this file, it is usually specified the version of node it needs to run successfully. This information can be found in the section called engines

  {
  "engines": {
    "node": ">=0.10.3 <15"
    }
  }

The above code says that the application runs successfully if the version of node is higher than 0.10.3 but lower than 15.

Related