node. JS is a running environment for JavaScript and is an encapsulation of the Google V8 engine. is a server-side JavaScript interpreter. Include the relationship, Nodejs contains NPM, for example, you install the Nodejs, you open the cmd input npm-v will find out the line NPM version number, stating that NPM has been installed. Quote the Great God Summary: In fact NPM is Nodejs's package manager. When we developed on node. JS, we used a lot of JavaScript code that someone else had written,
If every time we need someone else's code, all search by name, download source, unzip, then use, will be very troublesome. So there is the guarantee manager NPM.
Everyone to write their own source code to the NPM online, if you want to use some or some, directly through the NPM installation can be, do not care where the source code.
And if we're going to use Module A, and module A is dependent on module B, and Module B is dependent on modules C and D, then NPM will
Download all dependent packages and manage them. Imagine how troublesome it would be to do all this work on our own!
The relationship between Nodejs and NPM