Over a period of time my
package-lock.json file grew substantially and I see lots of packages are used by multiple other packages as dependencies and hence being duplicated. I found this native NPM way of arranging the dependencies and removing duplicate installs.
- npm dedupe
This can shorthand to
Searches the local package tree and attempts to simplify the overall structure by moving dependencies further up the tree, where they can be more effectively shared by multiple dependent packages.