berry icon indicating copy to clipboard operation
berry copied to clipboard

[Bug?]: git+https dep from private package "isn't supported by any available resolver"

Open blumfontein opened this issue 3 years ago • 4 comments

Self-service

  • [ ] I'd be willing to implement a fix

Describe the bug

Hi! Yarn 3 can't resolve git+https dependencies from custom gitlab instance of a private package. This worked in Yarn 1.

Th error:

Error: @my/dep@https://pull-token:[email protected]/my/repo#semver:>=1 isn't supported by any available resolver
    at yf.getResolverByDescriptor (/projects/perfumer/platform/yarn-3.4.1.cjs:391:1647)
    at yf.bindDescriptor (/projects/perfumer/platform/yarn-3.4.1.cjs:391:1036)
    at Z (/projects/perfumer/platform/yarn-3.4.1.cjs:439:6900)

My package.json looks like this:

"dependencies": {
    "@my/dep": "git+https://pull-token:[email protected]/my/repo#semver:>=1",
  },

To reproduce

I can send a link to repo in the private message

Environment

System:
    OS: Linux 5.15 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
  Binaries:
    Node: 16.16.0 - /tmp/xfs-6e8ff5b1/node
    Yarn: 3.4.1 - /tmp/xfs-6e8ff5b1/yarn
    npm: 8.11.0 - /usr/bin/npm

Additional context

No response

blumfontein avatar Feb 03 '23 11:02 blumfontein

I figured out, that this works with packages with simple names like "my-dep", but doesn't work with names with "@" like "@my/dep"

r4m-ilyasm avatar Feb 03 '23 12:02 r4m-ilyasm

The patch protocol has the same problem with [email protected].

chenhebing avatar Dec 04 '23 12:12 chenhebing

Is there any update on this? This is blocking our team for quite some time from using yarn. Still not working in 4.2.1

4rcadiaN avatar May 07 '24 07:05 4rcadiaN

I ran into the same issue for patches. I managed to work around this as follows:

patch:@<SCOPE>/<PACKAGE>@npm%3A<VERSION>#~/.yarn/patches/@<SCOPE>-<PACKAGE>-npm-<VERSION>-<DIGEST>.patch

Effectively eliding the __archiveUrl segment. There might be a better manual workaround, but wanted to get this out there for now.

wuhkuh avatar Jun 07 '24 18:06 wuhkuh

Any new about this, have the same issue?

Quineone avatar Jan 07 '25 06:01 Quineone