Skip to content

[Bug?]: ESLint "Oops! Something went wrong! :(" with Node 24.15.0 when using PnP #7106

@ChatDeBlofeld

Description

@ChatDeBlofeld

Self-service

  • I'd be willing to implement a fix

Describe the bug

With Node 24.15.0 and PnP enabled, ESLint breaks with the following error:

Oops! Something went wrong! :(

ESLint: 10.2.0

TypeError: Cannot convert undefined or null to object
    at loadConfigFile (file:///assets/.yarn/__virtual__/eslint-virtual-e510b1d44f/2/root/.yarn/berry/cache/eslint-npm-10.2.0-e708d083bd-10c0.zip/node_modules/eslint/lib/config/config-loader.js:233:24)
    at async ConfigLoader.calculateConfigArray (file:///assets/.yarn/__virtual__/eslint-virtual-e510b1d44f/2/root/.yarn/berry/cache/eslint-npm-10.2.0-e708d083bd-10c0.zip/node_modules/eslint/lib/config/config-loader.js:588:23)
    at async #calculateConfigArray (file:///assets/.yarn/__virtual__/eslint-virtual-e510b1d44f/2/root/.yarn/berry/cache/eslint-npm-10.2.0-e708d083bd-10c0.zip/node_modules/eslint/lib/config/config-loader.js:369:19)
    at async entryFilter (file:///assets/.yarn/__virtual__/eslint-virtual-e510b1d44f/2/root/.yarn/berry/cache/eslint-npm-10.2.0-e708d083bd-10c0.zip/node_modules/eslint/lib/eslint/eslint-helpers.js:324:5)
    at async NodeHfs.<anonymous> (file:///root/.yarn/berry/cache/@humanfs-core-npm-0.19.1-e2e7aaeb6e-10c0.zip/node_modules/@humanfs/core/src/hfs.js:574:24)
    at async NodeHfs.walk (file:///root/.yarn/berry/cache/@humanfs-core-npm-0.19.1-e2e7aaeb6e-10c0.zip/node_modules/@humanfs/core/src/hfs.js:614:3)
    at async globSearch (file:///assets/.yarn/__virtual__/eslint-virtual-e510b1d44f/2/root/.yarn/berry/cache/eslint-npm-10.2.0-e708d083bd-10c0.zip/node_modules/eslint/lib/eslint/eslint-helpers.js:366:20)
    at async Promise.allSettled (index 0)
    at async globMultiSearch (file:///assets/.yarn/__virtual__/eslint-virtual-e510b1d44f/2/root/.yarn/berry/cache/eslint-npm-10.2.0-e708d083bd-10c0.zip/node_modules/eslint/lib/eslint/eslint-helpers.js:457:18)
    at async Promise.all (index 0)

Works fine with nodeLinker: node-modules.
Works fine with Node 24.13.1.
Affects version 9.39.* of ESLint as well.

Can't test Node 25 due to this error: #7065

Should this be posted on Node or/and ESLint trackers as well?

To reproduce

  1. Install Node >= 24.15.0
  2. Create files package.json, empty .yarnrc.yml and empty eslint.config.mjs.
{
  "name": "eslint-yarn-pnp-bug",
  "version": "1.0.0",
  "packageManager": "yarn@4.14.1",
  "devDependencies": {
    "eslint": "^10.2.0"
  }
  1. Run yarn install && yarn eslint

Environment

System:
  OS: Linux 6.19 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
  CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
Binaries:
  Node: 24.15.0 - /tmp/xfs-148a7c7b/node
  Yarn: 4.14.1 - /tmp/xfs-148a7c7b/yarn
  npm: 11.12.1 - /usr/local/bin/npm

Additional context

Minimal reproducible example has been run in a container, but the bug can be reproduced on other setups as well.

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