I was trying to debug an error for a couple of hours. Later, I realised I was using an older version of NodeJS which was one among the many dependencies!
Here's how to properly install the current LTS version of NodeJS.
# This is an important step
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install nodejs
In case, if you get an overwrite error. Do the following.
sudo dpkg -i --force-overwrite /var/cache/apt/archives/nodejs_18.16.1-deb-1nodesource1_amd64.deb
sudo apt -f install
sudo apt update
sudo apt dist-upgrade
Now, you are good to go. Enjoy the latest LTS (Long Term Support) version of NodeJS! 🥳
Top comments (0)