Installation and configuration of node.js and NPM


Installation of node.js

CentOS installation:
$ dnf module list nodejs
$ dnf module install nodejs:14
Windows installation:

To view the installed version:

$ node -v

NPM installation

Node.js has a built-in NPM package management tool, which does not need to be installed separately.

To view the installed version:

$ npm -v

Upgrade NPM to the latest version:

$ npm install npm -g

Configure NPM to use Taobao image source

Temporary use
$ npm install express --registry
Permanent use
$ npm config set registry
$ npm config get registry
$ npm info express

Return to the original official address

$ npm config set registry
Use cnpm instead
$ npm install cnpm -g --registry=
$ cnpm install express