11cb0ef41Sopenharmony_ci--- 21cb0ef41Sopenharmony_cititle: npm-shrinkwrap.json 31cb0ef41Sopenharmony_cisection: 5 41cb0ef41Sopenharmony_cidescription: A publishable lockfile 51cb0ef41Sopenharmony_ci--- 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci### Description 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci`npm-shrinkwrap.json` is a file created by [`npm 101cb0ef41Sopenharmony_cishrinkwrap`](/commands/npm-shrinkwrap). It is identical to 111cb0ef41Sopenharmony_ci`package-lock.json`, with one major caveat: Unlike `package-lock.json`, 121cb0ef41Sopenharmony_ci`npm-shrinkwrap.json` may be included when publishing a package. 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ciThe recommended use-case for `npm-shrinkwrap.json` is applications deployed 151cb0ef41Sopenharmony_cithrough the publishing process on the registry: for example, daemons and 161cb0ef41Sopenharmony_cicommand-line tools intended as global installs or `devDependencies`. It's 171cb0ef41Sopenharmony_cistrongly discouraged for library authors to publish this file, since that 181cb0ef41Sopenharmony_ciwould prevent end users from having control over transitive dependency 191cb0ef41Sopenharmony_ciupdates. 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ciIf both `package-lock.json` and `npm-shrinkwrap.json` are present in a 221cb0ef41Sopenharmony_cipackage root, `npm-shrinkwrap.json` will be preferred over the 231cb0ef41Sopenharmony_ci`package-lock.json` file. 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ciFor full details and description of the `npm-shrinkwrap.json` file format, 261cb0ef41Sopenharmony_cirefer to the manual page for 271cb0ef41Sopenharmony_ci[package-lock.json](/configuring-npm/package-lock-json). 281cb0ef41Sopenharmony_ci 291cb0ef41Sopenharmony_ci### See also 301cb0ef41Sopenharmony_ci 311cb0ef41Sopenharmony_ci* [npm shrinkwrap](/commands/npm-shrinkwrap) 321cb0ef41Sopenharmony_ci* [package-lock.json](/configuring-npm/package-lock-json) 331cb0ef41Sopenharmony_ci* [package.json](/configuring-npm/package-json) 341cb0ef41Sopenharmony_ci* [npm install](/commands/npm-install) 35