Repository navigation
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
- Install Node >=
24.15.0 - Create files
package.json, empty.yarnrc.ymland emptyeslint.config.mjs.
{
"name": "eslint-yarn-pnp-bug",
"version": "1.0.0",
"packageManager": "[email protected]",
"devDependencies": {
"eslint": "10.2.0"
}
}
- 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/npmAdditional context
Minimal reproducible example has been run in a container, but the bug can be reproduced on other setups as well.
Reacted by Peter Sutter, Jérôme Varani, Mike McCready, Daniel, Joshua Napoli, Lars Ole Simonsen and Filip Malinowski
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
MikeMcC399 commentedon Apr 18, 2026
MikeMcC399 commentedon Apr 18, 2026
clemyan commentedon Apr 20, 2026
See nodejs/node#62012 (comment)
smeng9 commentedon Apr 28, 2026
Hi @ChatDeBlofeld Temporary workaround for eslint:
Perform
yarn patch eslint, Remove the line ineslint/lib/config/config-loader.jswith following contentdelete require.cache[filePath];then performyarn patch-commit -s /private/var/folders/pv/dl4zfc_n3g72hzphrtzm50zm0000gn/T/xfs-f085919f/user.Your issue should be solved.
MikeMcC399 commentedon May 18, 2026
[email protected] (released May 1, 2026) avoids this error, see eslint/eslint#20813
MikeMcC399 commentedon May 18, 2026
ChatDeBlofeld commentedon May 19, 2026
I've corrected the content, thanks.
web2ls commentedon Jul 23, 2026
For anyone landing here from a non-ESLint context: this isn't ESLint-specific — same delete require.cache[file] / require.extensions pattern, same crash, also hits:
Is Yarn planning its own fix/workaround on the PnP side for users stuck on 22.x or is waiting for an eventual Node-side fix the only path forward?
MikeMcC399 commentedon Oct 22, 2026
This issue is causing a failure in
citgmrunning under Node.js 22 - see nodejs/citgm#1164