2019-11-05 14:55:08 -05:00
|
|
|
---
|
|
|
|
title: npm-shrinkwrap
|
2020-11-01 07:54:36 +01:00
|
|
|
section: 1
|
2019-11-05 14:55:08 -05:00
|
|
|
description: Lock down dependency versions for publication
|
|
|
|
---
|
|
|
|
|
|
|
|
### Synopsis
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm shrinkwrap
|
|
|
|
```
|
|
|
|
|
2021-03-23 14:58:11 -04:00
|
|
|
Note: This command is unaware of workspaces.
|
|
|
|
|
2019-11-05 14:55:08 -05:00
|
|
|
### Description
|
|
|
|
|
|
|
|
This command repurposes `package-lock.json` into a publishable
|
2021-01-15 16:09:24 -05:00
|
|
|
`npm-shrinkwrap.json` or simply creates a new one. The file created and
|
|
|
|
updated by this command will then take precedence over any other existing
|
|
|
|
or future `package-lock.json` files. For a detailed explanation of the
|
|
|
|
design and purpose of package locks in npm, see
|
|
|
|
[package-lock-json](/configuring-npm/package-lock-json).
|
2019-11-05 14:55:08 -05:00
|
|
|
|
|
|
|
### See Also
|
|
|
|
|
2020-11-01 07:54:36 +01:00
|
|
|
* [npm install](/commands/npm-install)
|
|
|
|
* [npm run-script](/commands/npm-run-script)
|
2019-11-05 14:55:08 -05:00
|
|
|
* [npm scripts](/using-npm/scripts)
|
2021-01-15 16:09:24 -05:00
|
|
|
* [package.json](/configuring-npm/package-json)
|
2019-11-05 14:55:08 -05:00
|
|
|
* [package-lock.json](/configuring-npm/package-lock-json)
|
2021-01-15 16:09:24 -05:00
|
|
|
* [npm-shrinkwrap.json](/configuring-npm/npm-shrinkwrap-json)
|
2020-11-01 07:54:36 +01:00
|
|
|
* [npm ls](/commands/npm-ls)
|