Open r34son opened 4 months ago
Can you make a more minimal reproduction of the issue?
@voxpelli I can observe this issue in the latest Config Inspector (0.5.5) when creating a new Next.js project (15.0.1). Versions below are pinned for reproducibility:
cd /tmp
npx create-next-app@15.0.1 --use-npm --yes config-inspector-issue-70
cd config-inspector-issue-70
npx @eslint/migrate-config .eslintrc.json
npm install @eslint/js @eslint/eslintrc -D
rm .eslintrc.json
npm install
npx @eslint/config-inspector@0.5.5
ℹ Starting ESLint config inspector at http://localhost:7777
ℹ Reading ESLint config from /private/tmp/config-inspector-issue-70/eslint.config.mjs
Failed to load `eslint.config.js`.
Note that `@eslint/config-inspector` only works with the flat config format:
https://eslint.org/docs/latest/use/configure/configuration-files-new
Error: Cannot read config file: /private/tmp/config-inspector-issue-70/node_modules/eslint-config-next/index.js
Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
Referenced from: /private/tmp/config-inspector-issue-70/node_modules/eslint-config-next/core-web-vitals.js
at Object.<anonymous> (/private/tmp/config-inspector-issue-70/node_modules/@rushstack/eslint-patch/lib/_patch-base.js:167:19)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Module.require (node:internal/modules/cjs/loader:1311:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/private/tmp/config-inspector-issue-70/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js:11:23)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
Must be this line: https://github.com/vercel/next.js/blob/655b808c5b352350fe85c0fadc7b92ff251e675b/packages/eslint-config-next/index.js#L53
eslint.config.mjs
:Full error
``` Failed to load eslint.config.js Error: Cannot read config file: /Users/seitasanov/ownProjects/profile/node_modules/.pnpm/eslint-config-next@15.0.0-canary.39_eslint@9.5.0_typescript@5.5.2/node_modules/eslint-config-next/index.js Error: Failed to patch ESLint because the calling module was not recognized. If you are using a newer ESLint version that may be unsupported, please create a GitHub issue: https://github.com/microsoft/rushstack/issues Referenced from: /Users/seitasanov/ownProjects/profile/node_modules/.pnpm/eslint-config-next@15.0.0-canary.39_eslint@9.5.0_typescript@5.5.2/node_modules/eslint-config-next/core-web-vitals.js ```