Upgrading/installing node in yarn

Samuel Lucas
2 min readDec 7, 2020

Hello my gorgeous developers ✌️. How are you today?

Have you been using node without problems for the past few months but started encountering some problems with the “outdated” version you have?

Well, good news 😜, I was also there before now.

Let me start out this way. What actually prompted me to write this blog post is because of the kinda high level of difficulty you’ll go through to actually get to know how to upgrade your node version 🥵. I encountered this problem and I know some other folks out there are surely going through same “pain in the code”. 😅

Worry not, you’ve got the solution here. 🥳

Note that the error can come in various forms, all you need to do so as to discover that it is actually a node version problem is to check for the keywords “incompatible”, “node -version-”. If you see these two, then you’ve got to upgrade your node to the latest or just a higher version than that you have installed already.

Let’s kick off already 🚴🏽💨

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash

Copy the above line of code to install nvm. It’s actually a node version manager which you can use to upgrade node to any version of your choice.

You can run it in your code directory, root directory, or just anywhere. But preferably your root directory.

Upon completion, run the following code:

nvm install node

This will upgrade your node to the latest version as at the time you’re running it.

PS: Restart your console/command line for the changes to have effect.

And there you have it.

I greatly hope reading through as actually helped.

Thank you 🌚

--

--

Samuel Lucas

Writer and developer based in Nigeria. On Medium, I write about JavaScript and web development 💻