Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not install package with dependencies via another registry #41

Closed
nowsprinting opened this issue Jul 17, 2022 · 4 comments · Fixed by #374
Closed

Can not install package with dependencies via another registry #41

nowsprinting opened this issue Jul 17, 2022 · 4 comments · Fixed by #374
Labels
bug Something isn't working

Comments

@nowsprinting
Copy link
Contributor

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 com.unity.mathematics@1.2.1 is not a valid choice of 0.0.1-security
notice suggest to install com.unity.mathematics@1.2.1 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

@favoyang
Copy link
Member

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.

@ComradeVanti
Copy link
Collaborator

The fix for this could be to search the upstream if no good version was found in the primary registry, correct?

@favoyang
Copy link
Member

Or, we could first search for the upstream registry (Unity registry) first, and assume that it takes higher priority.

@favoyang favoyang added the bug Something isn't working label Jan 17, 2024
@ComradeVanti
Copy link
Collaborator

That is also a possibility. I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants