Recently, I wanted to deploy a node.js project on Google Cloud Platform(GCP) Compute Engine VM Instance. The project is written on AdonisJS. An elegant Node.js framework that takes developers’ happiness a top priority.

The Adonis version I used for the project was the preview version recently released and it requires node v14.* and NPM 6.13.* But my instance, pre-installed NPM 6.14 and node 8.13. So, looking at the node version, you definitely know the deployment won’t work.

This was the reason I had to find a way to upgrade the node version pre-installed to the latest version which is v14 as the time of writing this post.

Let’s get started

If you don’t like curl ... | sudo bash - then you can follow this manual instructions.

Open your terminal and copy paste the commands below:

Installation on Ubuntu

curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

Installation on Debian

curl -sL | bash -
sudo apt-get install -y nodejs

Note: If you don’t have curl installed, you might need to install it first.

Important action

If everything went well, you can type the command below to verify the upgrade.

node -v

You should see something this.

$ v14.*

Congrats. You’ve successfully upgraded the node version on your unix machine.

If you encounter any issue while following these steps, kindly drop a comment at the comment section below.

(Visited 98 times, 1 visits today)

Leave A Comment

Your email address will not be published. Required fields are marked *