DEV Community

Muhammad
Muhammad

Posted on

Does 'npm update' change the version numbers in the package.json file?

Short answer:

No, npm update does NOT change the version numbers in the package.json file to updated version numbers.

Long answer:

  1. Running npm updatedoes not update the version numbers in the package.json file.
  2. However it does change the version numbers in the "node_modules/packagename" field of the respective packages listed in the "packages" key and the dependecies in the "dependencies" keys in the package-lock.jsonfile.

Top comments (0)