Skip to content

[Bug?]: Resolving GitHub repo as source #7024

@MrZyr0

Description

@MrZyr0

Self-service

  • I'd be willing to implement a fix

Describe the bug

Yarn >4.10.x fails to install GitHub dependencies (fork branches) with ESLint plugins under PnP mode, resulting in Error: Qualified path resolution failed: we looked for the following paths, but none could be accessed. during ESLint execution.
Even the installation achieved successfully and use different source format : github:MrZyr0/eslint-plugin-sql#feat/flat-config-support, https://github.com/MrZyr0/eslint-plugin-sql#feat/flat-config-support or https://github.com/MrZyr0/eslint-plugin-sql/archive/refs/heads/feat/flat-config-support.zip.

Potentially important information, possibly related to the subject:
I use Volta to manage binaries on my project and pin to Yarn 4.12.0 is recognized but yarn --version still reports 4.10.3 despite correct package.json declarations.
And to have my installation working with a git source, I've downgraded git to version 2.50.1.

To reproduce

  1. Install Volat : curl https://get.volta.sh | bash
  2. Create project with package.json:
    {
    "volta": { "yarn": "4.12.0" },
    "packageManager": "[email protected]",
    "scripts": {
    "lint": "eslint *.js",
    },
    "devDependencies": {
    "eslint": "^9.39.1",
    "eslint-plugin-sql": "github:MrZyr0/eslint-plugin-sql#feat/flat-config-support"
    }
    }
  3. Install depsyarn install
  4. Init basic ESLint configuration using yarn create @eslint/config
  5. Add the plugin to the ESLint configuration:
import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";
import eslintPluginSql from 'eslint-plugin-sql';

export default defineConfig([
	// ...defaultConfig
  { plugins: { eslintPluginSql.configs['flat/recommended'].plugins }, rules: { ... eslintPluginSql.configs['flat/recommended'].rules } },
]);
  1. Run ESLint using yarn lint

Environment

System:
  OS: macOS (Sequoia v15.7.2) 
  CPU: Apple M1 Max
Binaries:
  Node: 25.0.0 - via Volta
  Yarn: 4.12.0 (pinned via Volta, but yarn --version shows 4.10.3)
  npm: latest
  Git: 2.50 (system macOS, Homebrew Git (`v2.52` caused core.autocrlf bug)
  Volta: latest

Additional context

Repo accessible: git ls-remote https://github.com/MrZyr0/eslint-plugin-sql.git feat/flat-config-support

Git config clean: core.autocrlf=input (verified with git config --list --show-origin)

npm works perfectly with same Git dep

Related: #6219 (ESLint flat config), #1554 (qualified path resolution), #3910 (ESLint plugins)

PR context: gajus/eslint-plugin-sql#62 (waiting merge)

Workarounds tested (all fail):

  1. GIT_CONFIG_GLOBAL= yarn install
  2. Tarball URL: https://github.com/.../archive/feat/flat-config-support.tar.gz
  3. Manual .pnp.cjs + @yarnpkg/sdks eslint
  4. volta run yarn install (still uses 4.10.3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions