nextjs - 💡(How to fix) Fix Fix Biome noShadowRestrictedNames for Error boudaries [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#84680Fetched 2026-04-08 02:18:46
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
closed ×1commented ×1labeled ×1locked ×1

Error Message

Exporting a component named Error as described in the Nextjs Docs will lead to a Biome Linter error noShadowRestrictedNames.

Code Example

"linter": {
    "enabled": true,
    "rules": {
      "suspicious": {
        "noShadowRestrictedNames": "off"
      }
    },
  }
RAW_BUFFERClick to expand / collapse

Exporting a component named Error as described in the Nextjs Docs will lead to a Biome Linter error noShadowRestrictedNames.

Disabling this in the biome.json will resolve this:


"linter": {
    "enabled": true,
    "rules": {
      "suspicious": {
        "noShadowRestrictedNames": "off"
      }
    },
  }

Ideally this would be part of the next domain in Biome

extent analysis

TL;DR

Disabling the noShadowRestrictedNames rule in the Biome linter configuration resolves the error when exporting a component named Error in a Next.js project.

Guidance

  • The error noShadowRestrictedNames is triggered by the Biome linter when a component is named Error, which is a restricted name.
  • To resolve the issue, update the biome.json file to disable the noShadowRestrictedNames rule for suspicious errors.
  • Consider renaming the component to avoid conflicts with restricted names, if possible.
  • Review the Next.js documentation and Biome linter rules to ensure compliance with best practices.

Example

"linter": {
  "enabled": true,
  "rules": {
    "suspicious": {
      "noShadowRestrictedNames": "off"
    }
  }
}

Notes

This solution assumes that disabling the noShadowRestrictedNames rule does not introduce any security vulnerabilities or other issues in the project.

Recommendation

Apply workaround: Disabling the noShadowRestrictedNames rule is a straightforward solution to resolve the error, but it may be worth considering renaming the component to avoid potential conflicts in the future.

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 Fix Biome noShadowRestrictedNames for Error boudaries [1 comments, 2 participants]