nextjs - 💡(How to fix) Fix `eslint-plugin-next`: Types not referenced correctly from package.json [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#85568Fetched 2026-04-08 02:15:00
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×3closed ×1commented ×1issue_type_added ×1

Code Example

I don't think we need this
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

I don't think we need this

To Reproduce

According to package.json the types should be in ./dist/ (https://github.com/vercel/next.js/blob/canary/packages/eslint-config-next/package.json#L45-L61), but if you just download the package, you'll see they are somehow in ./dist/src`

Current vs. Expected behavior

I'd expect that either the type files live in ./dist, as package.json says, or that package.json is updated to refer to ./dist/src

Provide environment information

I don't think we need this

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

Linting, TypeScript

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

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

Additional context

No response

extent analysis

TL;DR

Update package.json to reflect the correct location of type files as ./dist/src to match the actual directory structure.

Guidance

  • Verify the directory structure of the downloaded package to confirm the type files are indeed in ./dist/src.
  • Check the package.json file for any scripts or configurations that might be influencing the type file location.
  • Consider updating the package.json file to reflect the correct location of type files, ensuring consistency between the package configuration and the actual file structure.
  • Test the update to ensure it resolves the discrepancy between the expected and actual behavior.

Notes

The solution assumes that the type files are correctly generated and placed in ./dist/src during the build process. If the issue persists after updating package.json, further investigation into the build process may be necessary.

Recommendation

Apply workaround: Update package.json to reflect the correct type file location, as this directly addresses the discrepancy between the package configuration and the actual file structure.

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