mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-03 15:55:32 +02:00
npm-dedupe: add page (#14421)
This commit is contained in:
parent
95be8d6dd0
commit
5732e50f81
1 changed files with 28 additions and 0 deletions
28
pages/common/npm-dedupe.md
Normal file
28
pages/common/npm-dedupe.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
# npm dedupe
|
||||
|
||||
> Reduce duplication in the `node_modules` directory.
|
||||
> More information: <https://docs.npmjs.com/cli/commands/npm-dedupe>.
|
||||
|
||||
- Deduplicate packages in `node_modules`:
|
||||
|
||||
`npm dedupe`
|
||||
|
||||
- Follow `package-lock.json` or `npm-shrinkwrap.json` during deduplication:
|
||||
|
||||
`npm dedupe --lock`
|
||||
|
||||
- Run deduplication in strict mode:
|
||||
|
||||
`npm dedupe --strict`
|
||||
|
||||
- Skip optional/peer dependencies during deduplication:
|
||||
|
||||
`npm dedupe --omit={{optional|peer}}`
|
||||
|
||||
- Enable detailed logging for troubleshooting:
|
||||
|
||||
`npm dedupe --loglevel=verbose`
|
||||
|
||||
- Limit deduplication to a specific package:
|
||||
|
||||
`npm dedupe {{package_name}}`
|
Loading…
Add table
Reference in a new issue