Install Latest Version of Node.js on Ubuntu or WSL 2

Search for a command to run...

No comments yet. Be the first to comment.
YAML Ain't a Markup Language. This is the full form of YAML. Why YAML ? YAML is a serialization language. Means that it is used to transfer the data from one end to other like from the backend to the frontend and it is also used to store data in k...

Creating Modules As our program grows we should split our code across multiple files. We refer to each file as a module. A module should contain related data, functions, and objects. def calc_tax(): pass def calc_shipping(): pass Importi...

Step 1: Install it sudo npm i -g npkill Or you can use it without installing with npx npx npkill Step 2: Go the directory where you want to scan for node_modules folder npkill # if you have installed it npx npkill # if you have not install...

Classes All the functions in a class should have at least one parameter and by default, we call it self. self is a reference to the current object # CREATEING CLASS class Point: def draw(self): print("draw") # CREATING OBJECT FROM THE...

This is not like pop notifications. This is more like a customized alert notification. Click here to visit the official GitHub page of this project. How to use react-toastify Step 1: Install it npm i react-toastify Step 2: Import it in app.js ...

There are many ways to install Node.js on linux.
One way is installing node.js through apt. But this way you will install version 6.
My way of installing node.js is through
nvm
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
You can just restart the shell or you can type this command
source ~/.profile
here are the nvm command to install Node.js
in
nvmnodeis an alias for the latest versionThe first version installed becomes the default. New shells will start with the default version of node.
nvm list
# list all the installed versions of nodejs
nvm ls-remote
# list all the versions available to be installed
nvm install node
# installs the latest version
nvm install 6.14.4 # or 10.10.0, 8.9.1, etc
# this installs a specific version
nvm use <version_number>
# This will use the current version number in the current shell
nvm unistall <version_number>
# uninstall a version
# ### Here is how you can change the version which will be used in any new shell by default
nvm alias default <version_number>
# EG : nvm alias default 14.15.1
# now the shel will start with node 14 by default
# ### check the node version in use
node --version