I have a previous version of node installed but after few days it gets automatically updated to the latest version. I do not want it to upgrade itself to a newer version.
You need to specify the exact node version in your package.json
file.
A bit of background, from the NPM documentation :
It's important to communicate the extent of changes in a new release of code, because sometimes updates can break code that a package needs (called dependencies).Semantic versioning (semver) is a standard that was designed to solve this problem.
node --version
; you will get a number formatted as XXX package.json
file and remove any ~
or ^
signs from the node version you want to use so that it won't update to any minor or batch changes. npm install
in your terminal again and you are done.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.