// Updating all globally-installed packages
npm update -g
// or
npm install npm@latest -g
// Determining which global packages need updating
npm outdated -g --depth=0
// Updating a single global package
npm update -g <package_name>
Update node via npm
// install this
sudo npm i -g n
// run this command
sudo n latest
list all globally installed npm modules
npm ls -g --depth 0
Install Specific Package Version
npm install package@1.1.1
Update all npm/Angular packages
// npm packages
npm i -g npm-check-updates
ncu -u
npm install
// angular packages
ng update --all
basic angular requirements
// global req.
npm i -g @angular/cli