• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2title: npm-shrinkwrap.json
3section: 5
4description: A publishable lockfile
5---
6
7### Description
8
9`npm-shrinkwrap.json` is a file created by [`npm
10shrinkwrap`](/commands/npm-shrinkwrap). It is identical to
11`package-lock.json`, with one major caveat: Unlike `package-lock.json`,
12`npm-shrinkwrap.json` may be included when publishing a package.
13
14The recommended use-case for `npm-shrinkwrap.json` is applications deployed
15through the publishing process on the registry: for example, daemons and
16command-line tools intended as global installs or `devDependencies`. It's
17strongly discouraged for library authors to publish this file, since that
18would prevent end users from having control over transitive dependency
19updates.
20
21If both `package-lock.json` and `npm-shrinkwrap.json` are present in a
22package root, `npm-shrinkwrap.json` will be preferred over the
23`package-lock.json` file.
24
25For full details and description of the `npm-shrinkwrap.json` file format,
26refer to the manual page for
27[package-lock.json](/configuring-npm/package-lock-json).
28
29### See also
30
31* [npm shrinkwrap](/commands/npm-shrinkwrap)
32* [package-lock.json](/configuring-npm/package-lock-json)
33* [package.json](/configuring-npm/package-json)
34* [npm install](/commands/npm-install)
35