Node.js – installation, update, usage

Install required packages

# apt-get install debian-keyring debian-archive-keyring apt-transport-https dirmngr

Add sources to /etc/apt/sources.list

deb https://deb.nodesource.com/node_10.x stretch main
deb-src https://deb.nodesource.com/node_10.x stretch main

Add keys

# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1655A0AB68576280

Install Node.js

# apt-get update
# apt-get install nodejs
$ npm i -g create-react-app
$ npm install -g npm

Usage

$ create-react-app <nazwa>

Update

$ npm -v // show current version
$ n lsr // list versions
$ n latest // install and use latest
$ n 12.0.0 // install and use choosed version