Find why npm dedupe hangs infinitely

Viewed 356

I'm trying to flatten my dependency tree. When I'm using command

npm dedupe

It just hangs eating processor and even after half an hour it does not respond...

When I execute npm -ddd dedupe to see what is happening (-ddd sets loglevel to silly level most verbosive possible)

I see that it hangs after building ideal tree:

npm sill idealTree ├─┬ yargs-parser@5.0.0-security.0
npm sill idealTree │ └── camelcase@3.0.0
npm sill idealTree ├─┬ yargs@7.1.1
npm sill idealTree │ └── camelcase@3.0.0
npm sill idealTree └── yup@0.31.0
npm sill dedupe generateActionsToTake

And it hangs on npm sill dedupe generateActionsToTake.

What can be reason of this? npm doctor says this:

Check                               Value                        Recommendation
npm ping                            ok
npm -v                              v6.14.9
node -v                             v14.15.1
npm config get registry             https://registry.npmjs.org/
which git                           /usr/bin/git
Perms check on cached files         ok
Perms check on global node_modules  ok
Perms check on local node_modules   ok
Verify cache contents               verified 10269 tarballs

I don't know what else should I check. I noticed also that this is happening only in one of my project.

0 Answers
Related