# checks Node.js version
node -v
# checks NPM version
npm -v
# clears the cache (in case of issues)
npm cache clean --force
# updates npm
npm install -g npm
npm update -g
# displays dependencies on one package (natives in this example)
npm ls natives
# displays peer dependencies
npm view tsickle@0.34.3 peerDependencies
Registries
# lists registries
npm config list registry
# resets to the default registry
npm config set registry https://registry.npmjs.org/
Recipes
Update packages
# installs the tool globally
npm install -g npm-check-updates
# runs the tool against a project (in the project root directory)
ncu -u
# installs the packages from the newly updated package.json file
npm install
Working with MyGet
Add another registry on MyGet: npm config set @mycompany:registry https://www.myget.org/F/mycompany/npm/