Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 555 Bytes

section2.9.md

File metadata and controls

15 lines (11 loc) · 555 Bytes

Section 2.9: Updating npm and packages

Since npm itself is a Node.js module, it can be updated using itself.

  • If OS is Windows must be running command prompt as Admin

    • npm install -g npm@latest
  • If you want to check for updated versions you can do:

    • npm outdated
  • In order to update a specific package:

  • npm update <package name>

This will update the package to the latest version according to the restrictions in package.json In case you also want to lock the updated version in package.json:

  • npm update <package name> --save