Setup Nodejs and npm - spaceshiptrip/raspberrypi GitHub Wiki
- Find the current version of nodejs LTS --> https://nodejs.org/en/about/releases/
- At the time of writing, current LTS version was 15. Your mileage may vary.
- curl it down:
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
- Once the repository is enabled, install Node.js and npm by typing:
sudo apt-get install -y nodejs
- Clean up - Recommended:
sudo apt autoremove
- From their installation instructions:
## Run `sudo apt-get install -y nodejs` to install Node.js 15.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
- Install
forever.js
https://www.npmjs.com/package/forever