CheatSheet - NodeJS and npm

CheatSheet - NodeJS and npm


NodeJS Version 14:

curl -sL | sudo -E bash -
sudo apt-get install nodejs


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