简体   繁体   中英

Why does every project requires a specific node/ npm version?

Why do I have to care about npm/node version (running on machine/needed by project)?

  • Why does every project require a specific node/ npm version?

  • Where in the project is the required version noted ( package-lock.json )?

  • Is something bad about requiring older version of node/npm?

  • Is it possible/necessary to upgrade project to run with latest versions?

Why do I have to care about npm/ node version ( running on machine / needed by project )?

This question is very broad, I will try to answer it as precise as possible. Every version has certain addition/modifications/deletions in its modules. If you have a project that runs on Nodev16 it is also important to update the npm version(some minimum version) for compatibility with peer dependencies is important. Similarly, if we have a lower node version like v12, all the dependencies should be compatible with it like npm(to install dependencies with the same version)

Why does every project requires a specific node/ npm version ?

It depends on the project that you create. You can also update the versions of your project. There is a guide on how to update Node.js projects.

Is something bad about requiring an older version of node/ npm ? Is it possible/ necessary to upgrade the project to run with the latest versions?

Yes, you need to always update the older version to the current version because your project might be vulnerable to security loopholes or older version compatibility issues with a newer version.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM