In order to ensure specific version of
node used in the npm project you can add entry to
package.json and create
If you want to make sure every developer and environment uses the same
npm you just need to add
engines entry to
.npmrc is used to define
npm settings. As said in the official docs:
npmgets its config settings from the command line, environment variables, and npmrc files.
With the above settings the
npm makes sure, the strict versions of engines are used in the project. Now if someones try to run
npm install with non-matching
npm versions it will be stopped with error response.
With such configuration you make sure, there are no unexpected changes in the
package-json.lock files. That’s it!