jpg619/version-bump-tar-2
@reggi/path-to-regexp
dependabot/npm_and_yarn/main/copy-to-clipboard-4.0.2
dependabot/npm_and_yarn/main/eslint-10.4.0
dependabot/npm_and_yarn/main/npmcli/eslint-config-7.0.0
dependabot/npm_and_yarn/main/proc-log-7.0.0
dependabot/npm_and_yarn/npm_and_yarn-826852524d
dependabot/npm_and_yarn/npm_and_yarn-ab9a7f4bc2
deprecate-totp-2fa
dhei/classic-tokens
gat-bypass-2fa-docs
jpg619/fix-accessibility-content-flow
jpg619/version-bump-tar-2
kartykp/gat-bypass-2fa-docs
kartykp/upgrade-path-to-regex
main
maitxn/version-bump-tar
patch-1
reggi/cache-based-on-version
reggi/dev-engines
reggi/fix-transform-prettier
reggi/overrides
update-search-sensitivity
| 1 | --- |
| 2 | title: npm-shrinkwrap.json |
| 3 | section: 5 |
| 4 | description: A publishable lockfile |
| 5 | github_repo: npm/cli |
| 6 | github_branch: latest |
| 7 | github_path: docs/lib/content/configuring-npm/npm-shrinkwrap-json.md |
| 8 | redirect_from: |
| 9 | - /cli-documentation/configuring-npm/npm-shrinkwrap-json |
| 10 | - /cli-documentation/configuring-npm/npm-shrinkwrap.json |
| 11 | - /cli-documentation/files/npm-shrinkwrap-json |
| 12 | - /cli-documentation/files/npm-shrinkwrap.json |
| 13 | - /cli-documentation/v11/configuring-npm/npm-shrinkwrap-json |
| 14 | - /cli-documentation/v11/configuring-npm/npm-shrinkwrap.json |
| 15 | - /cli-documentation/v11/files/npm-shrinkwrap-json |
| 16 | - /cli-documentation/v11/files/npm-shrinkwrap.json |
| 17 | - /cli/configuring-npm/npm-shrinkwrap-json |
| 18 | - /cli/configuring-npm/npm-shrinkwrap.json |
| 19 | - /cli/files/npm-shrinkwrap-json |
| 20 | - /cli/files/npm-shrinkwrap.json |
| 21 | - /cli/v11/configuring-npm/npm-shrinkwrap.json |
| 22 | - /cli/v11/files/npm-shrinkwrap-json |
| 23 | - /cli/v11/files/npm-shrinkwrap.json |
| 24 | - /configuring-npm/npm-shrinkwrap-json |
| 25 | - /configuring-npm/npm-shrinkwrap.json |
| 26 | - /files/npm-shrinkwrap-json |
| 27 | - /files/npm-shrinkwrap.json |
| 28 | --- |
| 29 | |
| 30 | ### Description |
| 31 | |
| 32 | `npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli/v11/commands/npm-shrinkwrap). It is identical to `package-lock.json`, with one major caveat: Unlike `package-lock.json`, `npm-shrinkwrap.json` may be included when publishing a package. |
| 33 | |
| 34 | 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 strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates. |
| 35 | |
| 36 | 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. |
| 37 | |
| 38 | For full details and description of the `npm-shrinkwrap.json` file format, refer to the manual page for [package-lock.json](/cli/v11/configuring-npm/package-lock-json). |
| 39 | |
| 40 | ### See also |
| 41 | |
| 42 | - [npm shrinkwrap](/cli/v11/commands/npm-shrinkwrap) |
| 43 | - [package-lock.json](/cli/v11/configuring-npm/package-lock-json) |
| 44 | - [package.json](/cli/v11/configuring-npm/package-json) |
| 45 | - [npm install](/cli/v11/commands/npm-install) |