Updating local and global packages you downloaded from the registry helps keep your code and tools stable, usable, and secure.
We recommend regularly updating the local packages your project depends on to improve your code as improvements to its dependencies are made.
Navigate to the root directory of your project and ensure it contains a package.json file:
In your project root directory, run the update command:
To test the update, run the outdated command. There should not be any output.
Note: If you are using npm version 2.6.0 or less, run this script to update all outdated global packages.
However, please consider upgrading to the latest version of npm:
npm install [email protected] -g
To see which global packages need to be updated, on the command line, run:
npm outdated -g --depth=0
To update a single global package, on the command line, run:
npm update -g <package_name>
To update all global packages, on the command line, run:
npm update -g
© npm, Inc. and ContributorsLicensed under the npm License.npm is a trademark of npm, Inc.