The Node.js programming language is an open source project to make programmers more productive.
Check out the available NodeJS distributions. Consider the target environment for the application to be built.
- If you need to integrate with other solutions, it is often not useful to go with the bleeding edge version.
- If you have a greenfield project, select the latest long term support (LTS) version.
Download the application from the NodeJS repository e.g..
1curl -sL https://deb.nodesource.com/setup_12.x -o nodesource_setup.sh
Run the script to install Node
1sudo bash nodesource_setup.sh
Follow the onscreen instructions:
1sudo apt-get install -y nodejs
1curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - 2 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list 3 sudo apt-get update && sudo apt-get install yarn
Dependencies: It may be necessary to install additional packages
1sudo apt install -y build-essential libssl-dev
Confirm the install of NodeJS by checking the version
Confirm the installation of the npm package manager
1npm init --yes