yarnpkg / yarnpkg/berry

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

Open
#5,243 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
8.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

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:some-token@my-gitlab.com/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:some-token@my-gitlab.com/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the package.json dependency declaration and reproduce it using Yarn 3.4.1 on the reported environment; the error points to getResolverByDescriptor in yarn-3.4.1.cjs. Trace how this git+https URL with a private GitLab host and semver selector is classified, and consider the issue done when the dependency resolves successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.