How to upgrade the nodejs NPM version of CentOS


Delete node

yum remove nodejs

Delete Yum source

CD to Yum source configuration folder:cd /etc/yum.repo.d, delete the source starting with node;
Clear Yum cacheyum clean all

Install node

curl -sL | bash -

yum install -y nodejs

Update NPM

npm install [email protected] -g
The command: NPM – V output version number is successfully installed.