CheatSheet - NodeJS and NPM

CheatSheet - NodeJS and NPM

Installation

NodeJS Version 14:

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install nodejs

Check

node -v
npm -v

Global Packages

sudo npm i -g nodemon

Internal watch failed: ENOSPC

During development and using nodemon or any other such package, you may encounter an error:

Internal watch failed: ENOSPC: System limit for number of file watchers reached

To solve this issue just increase inotify watchers by:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Link
No links yet.