Hi friend, welcome. This is going to be a very short article. A tip on how to upgrade the latest version of node.js or npm.
Why would you want to do this? I don’t know. But whatever the reason might be, this tip is awesome.
When I was trying to use a package the other day, the error message I was seeing was that I should make sure I have the latest version of node/npm on my system. I did a little research on how to get the latest node version. I found out that many people have been having some problems. The use of PowerShell, complicated commands, change of directory path and all other stuff. I figure a safe way to do it. It worked for me anyway, and probably would for you too.
Now let’s get to the point.
The first step here is to uninstall node/npm from your system. Check if there are directories where they are hidden by typing where node on your terminal. As you can see in the screenshot above, I’m using Git Bash. Whichever one you’re using doesn’t matter. Delete the path you would see if there is any.
Now, visit Node.js and download your preferred node. It follows the normal installation process. Install it on your system. The latest node version comes the npm. Check your node version with node -v and your npm version with npm -v.
That’s it, guys. I hope this helps. Let me know what you think in the comment below. I appreciate.
You can also read
Thanks for reading