Skip to content

Test matrix: ERESOLVE on (eslint 7, parser 6) cells under strict peer-deps #4007

@captaindonald

Description

@captaindonald

Three cells in the node-minors and eslint-8- matrices flake at the
after_install step (npm install --no-save eslint@7 @typescript-eslint/parser@6 babel-eslint@…)
under NPM_CONFIG_LEGACY_PEER_DEPS=false:

  • node-minors: (16, 7, 10) — node 16, eslint 7, babel-eslint 10
  • eslint-8-: (19, 7, 8, 6) — node 19, eslint 7, babel-eslint 8, typescript-eslint 6
  • eslint-8-: (19, 7, 9, 6) — node 19, eslint 7, babel-eslint 9, typescript-eslint 6

Failure

npm warn peer eslint@"^7.32.0 || ^8.2.0" from eslint-config-airbnb-base@15.0.0
npm warn peer eslint@"^7.0.0 || ^8.0.0" from @typescript-eslint/parser@6.21.0
npm ERR! code ERESOLVE
npm ERR! Cannot destructure property 'name' of 'node' as it is undefined.

(The Cannot destructure … line is npm's own crash while it tries to print
the ERESOLVE diagnostic.)

Root cause

Both workflows set NPM_CONFIG_LEGACY_PEER_DEPS=false for the affected cells:

  • node-minors: when node-version >= 16 && eslint >= 7
  • eslint-8-: when typescript-eslint >= 6

Under strict peer-deps, the bare npm install resolves with the latest
eslint matching devDependencies.eslint (currently ^9.7), then the
after_install step tries to swap it down to eslint@7. The combination
of eslint-config-airbnb-base@15.0.0 (peers eslint@^7.32 || ^8.2),
@typescript-eslint/parser@6 (peers eslint@^7 || ^8), and other transitive
peer constraints leaves npm an unsatisfiable graph.

npm's tree resolver is nondeterministic on unsatisfiable peer graphs;
depending on cache state and resolution order, the install sometimes lands
with peer warnings and sometimes throws ERESOLVE. These cells aren't
deterministically broken — they lose the coin flip often enough to keep
showing up red.

Cross-check against #3979 (Feb 2026) and #4006

All three are intermittent. They've been seen both green and red across
the two PRs:

Resolution paths

  1. Drop strict peer-deps for these cells. Change the LEGACY_PEER_DEPS
    guard in both workflows so that eslint <= 8 paths always use
    LEGACY_PEER_DEPS=true. Surgical, no source changes, accepts that npm
    will warn rather than crash.
  2. Pin eslint-config-airbnb-base. It's the tightest peer constraint
    in the conflict (^7.32 || ^8.2). Pinning to a hypothetical newer
    version with broader peers, or replacing it with
    eslint-config-airbnb-base-typescript, would loosen the graph.
  3. Trim the matrix. Eslint 7 + parser 6 is the only combo failing;
    removing those cells (or only the ones still red after option 1) is
    the smallest change.

Discovered while triaging CI on #4006.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions