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 from the Great God Summary:
In fact, NPM is Nodejs's package manager. When we develop in node. js, we use a lot of JavaScript code that someone else has written, and if we need someone else's code, we can search for it by name, download the source, unzip it, and use it, it 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 are going to use module A and module A is dependent on module B and Module B is dependent on modules C and D, NPM will download and manage all dependent packages based on dependencies. Imagine how troublesome it would be to do all this work on our own!
Relationship between node. JS and NPM