npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

reinstall breaks after npm update to 6.10.2

What I Wanted to Do

After updating npm to 6.10.2, I observed the package-lock.json generated for local dependencies defer from the one created by 6.10.1 which, unfortunately, breaks the package install on running npm install again.

What Happened Instead

The installation fails.

Reproduction Steps

clone the repo


Platform Info

$ npm --versions
npm: 6.10.2
$ node -p process.platform
platform: darwin (MacOS Mojave)

Seemed familiar, looks similar to older (pre 6.10.2) issue:

Yes, seems to have resurfaced in 6.10.2.

Can you try this and see if it fixes the problem?

npm i -g "salomvary/npm-cli#fix-multimodule-local"

If it does, then I think landing (or something like it) will fix the problem. I still need to bisect into the history and see exactly why this fixes it, if it does. It’s a dense part of the codebase, sorry for the delay.


EDIT: Ok, scratch that. It does. It got some time to review this more thoroughly today, and the fix will be in the next release. That’ll be either 6.10.4 or 6.11.0, depending on whether I can finish and land peerDependenciesMeta, which would be a semver-minor.