NPM-SHRINKWRAP.JSON(5)

✨ NAME ✨

okay bestie, welcome to NPM-SHRINKWRAP.JSON(5) β€” the manual page for npm-shrinkwrap.json, aka A publishable lockfile πŸ’…

πŸŽ€ Description πŸŽ€

So npm-shrinkwrap.json is a file created by npm help shrinkwrap. It’s literally identical to package-lock.json, with one major caveat: unlike package-lock.json, npm-shrinkwrap.json may be included when publishing a package πŸ‘€βœ¨

The recommended use-case for npm-shrinkwrap.json is applications deployed through the publishing process on the registry β€” for example, daemons and command-line tools intended as global installs or devDependencies. It’s giving β€œdeploy me with my exact dependency situation, pls” 🫢

🚨 ngl, it’s strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates. Not the move for libraries, bestie 😭

If both package-lock.json and npm-shrinkwrap.json are present in a package root, npm-shrinkwrap.json will be preferred over the package-lock.json file. Yes, it wins the vibe check πŸ‘‘

For full details and description of the npm-shrinkwrap.json file format, refer to the manual page for package-lock.json (/configuring-npm/package-lock-json) πŸ’–


πŸ’… See also πŸ’…

  • npm help shrinkwrap
  • package-lock.json (/configuring-npm/package-lock-json)
  • package.json (/configuring-npm/package-json)
  • npm help install

Catch you later, bestie 🫢 β€” this page is NPM@11.19.1, dated August 2026, and it’s literally the NPM-SHRINKWRAP.JSON(5) manual. Mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from