Node.js
We recommend you to use the LaTest Stable version of Node (also called the "LTS" version). Currently, it is the 16.15.0 version.
- Windows/MacOS
- Linux
- Download Node.js LTS from the official website.
- Install Node.js by clicking on the executable you just downloaded.
Open a terminal and run
sudo apt update && sudo apt install nodejs npm -y
info
You might need in the future to have different versions of node.js installed for different projects. To manage them,
you can check the nvm
package which allowed you to have multiple versions of node.js.
Check that the installtion was successful:
- Open a terminal and run
node -v
, and thennpm -v
. - You should get a version number for each command. If you get an error such as
command not found
, the installation did not work. You can also have to restart your computer to make it work.
As you saw, node.js comes with two different commands:
node
is the programming language itself, which allow us to run scripts in javascriptnpm
is the node package manager, which we will use to install dependencies