upgrade node version using npm in centos 7 code example
Example: update nodejs centos
$ curl -sL https://rpm.nodesource.com/setup_12.x | bash -
sudo yum install nodejs
$ curl -sL https://rpm.nodesource.com/setup_12.x | bash -
sudo yum install nodejs