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 shrinkwrappackage-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
- centos-stream 10: nodejs26-npm 1:11.19.1-1.26.8.2.1.el10 Β· Apache-2.0 AND Artistic-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BlueOak-1.0.0 AND CC-BY-3.0 AND CC0-1.0 AND ISC AND MIT
- centos-stream 9: npm 1:11.19.1-1.26.8.2.2.module_el9+1444+554f3837 Β· Apache-2.0 AND Artistic-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BlueOak-1.0.0 AND CC-BY-3.0 AND CC0-1.0 AND ISC AND MIT
- nixpkgs unstable: heroku 11.11.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms