Closed brandones closed 3 years ago
Thanks for the thorough report @brandones!
Adding a bit more information from triaging this. In 7.20.2
the install completes but npm ls
reports the errors below, saying that the peerDependency ranges of 3.x
don't match the versions 3.1.10-pre.585
which is correct according to the spec.
Then in 7.20.3
this behavior was changed so that the tree wouldn't install by default in those cases and would report peerDependency conflicts (which could be overridden with --force
), but the infinite loop (#3616) was triggered by some of these unresolvable peerDependency ranges. This was fixed in 7.24.2
, so now the correct behavior is happening.
In this specific case, packages like @openmrs/esm-breadcrumbs@^3.1.10-pre.585
are setting peerDependency ranges like @openmrs/esm-state@3.x
which doesn't exist on the registry. I confirmed this with npm view @openmrs/esm-state@3.x version
. If I run it without the 3.x
it shows all the prerelease versions but none of those are satisfied by 3.x
. Note, that other peerDependencies in the tree like @openmrs/esm-config@3.x
do have satisfying versions published to the registry.
As a side note, I'm not sure why in 7.20.2 the peerDependency range of @openmrs/esm-state@3.x
doesn't trigger the same ETARGET
error.
As a fix, I think changing your peerDependency ranges to 3.x || >=3.1.10-pre
will work.
That makes sense. Thank you very much for the thorough explanation!
Is there an existing issue for this?
Current Behavior
It isn't possible to install the library
@openmrs/esm-framework@next
in npm 7.20.3+.npm install --save-dev @openmrs/esm-framework@next --verbose --loglevel silly
In 7.20.3 through 7.24.1 we get an infinite loop repeating these lines:
In 7.24.2 we get the output here on pastebin, concluding with
Possibly related to https://github.com/npm/cli/issues/3702, https://github.com/npm/cli/issues/3666, and https://github.com/npm/cli/issues/3616.
Expected Behavior
Install is successful with npm 7.20.2, concluding with
Steps To Reproduce
Environment