102 words
1 minute
Specify Node Version in package.json
Sometimes you may want your application to run on a certain version of node while developing. I find this most useful to make sure all developers are using the same major version of node on the project. With this setting in your package.json
it should create an error any time someone tries to run a project without the specific version
Add this project as a top level field in your package.json
"engines": {
"node": "8"
},
The above code will let the project be ran on any version of node that is 8, if it isn’t 8, the start command will throw an error
Specify Node Version in package.json
https://edwardbeazer.com/posts/specify-node-version-in-package-json/