Skip to content

Node Package Manager - npm

Terminal window
# Install dependencies
npm install
# Run tests
npm test
# Update dependencies
npm update
# Update global (-g) packages
npm update -g
# Install a global (-g) package to be available in path
npm install -g prettier
# List install packages
npm ls
# Uninstall a package
npm uninstall package_name
# NPM proxy setting
# per https://medium.com/@ogbemudiatimothy/using-npm-install-behind-a-corporate-proxy-server-db150c128899
npm config set proxy http://1.1.1.1:3128
npm config set https-proxy http://1.1.1.1:3128
# Remove proxy
npm config rm proxy
npm config rm https-proxy
# NPM Execute (npx) to run a local or remoate npm package, Angular CLI build
npx ng build
# Run angular CLI set up in the project
# Requires npm install first
# npm exec Check project files with ESLint version in project
npx eslint ./*.js