snippetbashTip
npm dedupe — Reduce duplication in the `node_modules` directory. More information: <https://docs.npmjs.com/cli/np
Viewed 0 times
thedirectorycommandnode_modulesclinpm dedupereduceduplication
Problem
How to use the
npm dedupe command: Reduce duplication in the node_modules directory. More information: <https://docs.npmjs.com/cli/npm-dedupe/>.Solution
npm dedupe — Reduce duplication in the node_modules directory. More information: <https://docs.npmjs.com/cli/npm-dedupe/>.Deduplicate packages in
node_modules:npm {{[ddp|dedupe]}}Follow
package-lock.json or npm-shrinkwrap.json during deduplication:npm {{[ddp|dedupe]}} --lockRun deduplication in strict mode:
npm {{[ddp|dedupe]}} --strictSkip optional/peer dependencies during deduplication:
npm {{[ddp|dedupe]}} --omit {{optional|peer}}Enable detailed logging for troubleshooting:
npm {{[ddp|dedupe]}} --loglevel verboseLimit deduplication to a specific package:
npm {{[ddp|dedupe]}} {{package_name}}Code Snippets
Deduplicate packages in `node_modules`
npm {{[ddp|dedupe]}}Follow `package-lock.json` or `npm-shrinkwrap.json` during deduplication
npm {{[ddp|dedupe]}} --lockRun deduplication in strict mode
npm {{[ddp|dedupe]}} --strictSkip optional/peer dependencies during deduplication
npm {{[ddp|dedupe]}} --omit {{optional|peer}}Enable detailed logging for troubleshooting
npm {{[ddp|dedupe]}} --loglevel verboseContext
tldr-pages: common/npm dedupe
Revisions (0)
No revisions yet.