Installing Node. js and npm from NodeSource
- Once the NodeSource repository is enabled, install Node.js and npm by typing: sudo apt install nodejs. ...
- Verify that the Node.js and npm were successfully installed by printing their versions: node --version v12.16.3 npm --version 6.14.4.