If you have installed your node.js in your CentOS 7 Virtual Machine, and there is a need for you to upgrade node.js to its latest version, you are in the right place.
But first, check your node.js version by the command below:
node -v
You should have this output below:

In our situation, let us upgrade node.js to v8.x, run the command below:
curl -sL https://rpm.nodesource.com/setup_8.x | bash -

yum install nodejs -y

From here, you should be all set. You may check your node.js version by:
node -v

Great Job.
Source: github.com/nodesource/distributions#installation-instructions
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.
wow thankyou for the article, i been stuck on mine, from 6.* upgrade to 10.* I solve mine with ‘sudo yum remove -y nodejs npm’ first and reinstall then