Include component name in "async/await is not supported" error message if available (#32435)

This commit is contained in:
Sebastian "Sebbie" Silbermann
2025-02-25 10:48:44 +01:00
committed by GitHub
parent 2567726503
commit 22e39ea72e
4 changed files with 41 additions and 24 deletions

View File

@@ -467,7 +467,7 @@
"479": "Cannot update optimistic state while rendering.",
"480": "File/Blob fields are not yet supported in progressive forms. Will fallback to client hydration.",
"481": "Tried to encode a Server Action from a different instance than the encoder is from. This is a bug in React.",
"482": "async/await is not yet supported in Client Components, only Server Components. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
"482": "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
"483": "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
"484": "A Server Component was postponed. The reason is omitted in production builds to avoid leaking sensitive details.",
"485": "Cannot update form state while rendering.",