nextjs - 💡(How to fix) Fix Incorrect `eslint-config-next` Type Export [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85378Fetched 2026-04-08 02:16:02
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Code Example

'yarn' is not recognized as an internal or external command,
operable program or batch file.
'pnpm' is not recognized as an internal or external command,
operable program or batch file.

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Enterprise
  Available memory (MB): 65361
  Available CPU cores: 20
Binaries:
  Node: 22.21.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://www.npmjs.com/package/eslint-config-next?activeTab=code

To Reproduce

  1. Attempt to import eslint-config-next/typescript or eslint-config-next/core-web-vitals.
  2. TypeScript will complain about no types being available for the package.

Current vs. Expected behavior

Look at the package.json's exports field and notice that the types are pointing to the /dist/ folder, not the /dist/src/ folder. This is causing issues when referencing the eslint-config-next/typescript or eslint-config-next/core-web-vitals

Provide environment information

'yarn' is not recognized as an internal or external command,
operable program or batch file.
'pnpm' is not recognized as an internal or external command,
operable program or batch file.

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Enterprise
  Available memory (MB): 65361
  Available CPU cores: 20
Binaries:
  Node: 22.21.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Linting

Which stage(s) are affected? (Select all that apply)

next build (local)

Additional context

It may be better to emit the type definitions along side the executable content or update the type exports to include the correct path. Either way, the pathing is incorrect in the project manafest.

extent analysis

TL;DR

Update the exports field in the package.json file to point to the correct path for types, which is likely /dist/src/ instead of /dist/.

Guidance

  • Verify the exports field in the package.json file of the eslint-config-next package to confirm the incorrect path.
  • Update the exports field to point to the correct path, for example, by changing "types": "./dist/index.d.ts" to "types": "./dist/src/index.d.ts".
  • After updating the exports field, attempt to import eslint-config-next/typescript or eslint-config-next/core-web-vitals again to see if the issue is resolved.
  • Consider emitting type definitions alongside the executable content as an alternative solution.

Example

No code snippet is provided as the issue is related to configuration rather than code.

Notes

The issue seems to be specific to the eslint-config-next package and its configuration. The solution may vary depending on the specific version of the package being used.

Recommendation

Apply workaround: Update the exports field in the package.json file to point to the correct path for types, as this is a configuration issue that can be resolved without waiting for a new version of the package.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

nextjs - 💡(How to fix) Fix Incorrect `eslint-config-next` Type Export [1 comments, 2 participants]