Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 748 Bytes

npm.md

File metadata and controls

54 lines (37 loc) · 748 Bytes
title
NPM

Install NPM

NPM comes with Node.js. To install Node.js: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

List outdated packages

npm outdated

Upgrade a package

Upgrade a dependency:

npm install packagename@latest

Upgrade a dev dependency:

npm install packagename@latest --save-dev

List installed packages

npm ls

Scan for vulnerabilities

npm audit

Fix vulnerabilities

  1. Try to fix automatically

    npm audit fix
    
  2. If that doesn't work:

    rm -rf node_modules/*
    npm install