Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.15 KB

updating.md

File metadata and controls

42 lines (31 loc) · 1.15 KB

Updating npm dependencies

  • Check outdated packages
npm outdated
  • Update local packages according to package.json
npm update
  • Upgrade packages manually
npm install --save[-dev] <package_name>@latest

Alternatively, you can use npm-check to perform an interactive upgrade:

npm-check -u --skip-unused

Locking package versions

Starting from npm@5 a new package-lock.json file is automatically generated when using npm install commands, to ensure a reproducible dependency tree and avoid unwanted package updates.

If you use a previous npm version, it is recommended to use npm shrinkwrap to lock down all your dependencies version:

npm shrinkwrap --dev

This will create a file npm-shrinkwrap.json alongside your package.json files.

Do not forget to run shrinkwrap each time you manually update your dependencies!

Updating angular-cli

The angular-cli package needs extra care with updating, see this doc.