The difference between node, nvm and npm: 1. nodejs is the code library required for project development, nvm is the nodejs version management tool, and npm is the nodejs package management tool; 2. nodejs can enable JavaScript to be browsed independently The server runs, nvm can manage the versions of nodejs and npm, and npm can manage third-party plug-ins for nodejs.
The operating environment of this article: Windows 10 system, nodejs version 12.19.0, Dell G3 computer.
1. Difference
nvm: nodejs version management tool.
In other words: one nvm can manage many node versions and npm versions.
The reason why this technology appears is because the node versions of different projects are also different, some are 5.0.1, and some are 6.3.2. If the node version is incorrect, you may encounter various inexplicable problems when running an application.
nodejs: The code library required during project development
npm: nodejs package management tool.
When installing nodejs, npm will also be installed along with it. It is a package management tool.
npm manages third-party plug-ins in nodejs. Its role is the same as bundler in Ruby and maven in Java, both of which manage third-party dependencies.
2. Relationship
nvm manages the versions of nodejs and npm
npm can manage third-party plug-ins for nodejs
Extended knowledge:
node.js is a javascript running environment that enables javascript to run without the browser. In the past, js could only be run on the basis of the browser, and it could be operated with the browser, such as zooming in and out on the browser, provided that the browser was opened (the browser is the client). With node.js, js can be operated on the server side, directly on the system, and can open and close the browser and other operations.
Simply put, Node.js is JavaScript running on the server side. Node.js is a platform built on the Chrome JavaScript runtime. Node.js is an event-driven I/O server-side JavaScript environment based on Google's V8 engine. The V8 engine executes Javascript very quickly and has very good performance.
Recommended learning :《nodejs video tutorial》
The above is the detailed content of What is the difference between node, nvm and npm. For more information, please follow other related articles on the PHP Chinese website!