openupm-cli
openupm-cli copied to clipboard
Can not install package with dependencies via another registry
Metamesh package is depend to com.unity.mathematics
.
And Metamesh package is published on npmjs.com.
I get an error with the following command.
$ openupm add --registry https://registry.npmjs.com jp.keijiro.metamesh
WARN 404 package [email protected] is not a valid choice of 0.0.1-security
notice suggest to install [email protected] or a replaceable version manually
ERR! missing dependencies please resolve thie issue or run with option -f to ignore the warning
I can install with the -f
option, but please refer to the com.unity registry without -f
option.
openupm version: 1.15.4
This is a bit tricky.
When working with any registries (openupm registry or the one you specified), OpenUPM-CLI DOES search the unity registry as upstream for dependencies, unless --no-upstream
is given.
However, it always searches the current registry first, if not found then searches the unity registry.
The registry.npmjs.com
registry contains a package named com.unity.mathematics
with only one version 0.0.1-security
. Then the CLI reported that it's not qualified for the required version 1.2.1
, and warned you to resolve it.
The fix for this could be to search the upstream if no good version was found in the primary registry, correct?
Or, we could first search for the upstream registry (Unity registry) first, and assume that it takes higher priority.
That is also a possibility. I'll take a look.