-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@svgr/webpack integration crashes on render inside server component (undefined runtime error) #69545
Comments
As a temporary workaround you can make the affected components client components using I'm not quite sure if this is a Next / React bug, or From https://github.com/vercel/next.js/releases/tag/v15.0.0-canary.93, the main relevant change is: Which points to a possible React bug or incompatibility due to breaking changes. |
it seems to be this one: vercel/next.js#69545 as suggested [here](vercel/next.js#69545 (comment)) a possible workaround could be to turn svgr components into client components
* feat(notification): init novu * [IVD-57] Migrate to radix themes (#72) * feat(UI): setup radix-theme * feat(UI): use custom radix theme color * feat(UI): migrate highscore pages to radix-theme * chore(ui): init base layout from shadcn block 'dashboard-05' * chore(deps): update vaul drawer module to latest minor * feat: try to implement custom Spinner with css only * chore(WIP): better invader loader + help page + layout * feat: tricky but working custom spinner * feat(UI): migrate help page to radix theme * feat(UI): migrate help/thanks page to radix theme * feat(UI): migrate legal pages to radix-ui * feat(UI): root layout/drawer fixes w/ map page + better styles * fix(UI): header top margin in PWA mode * feat: move root drawer into its own component * fix: breaking oklch colors handling on old devices * feat(UI): use RootDrawer in root layout + add global scroll handling * feat(UI): use new Spinner in root loading page * feat(UI): use radix-theme classes for Drawer + remove overlay * feat(UI): add padding for scrollbar in legal pages * fix(UI): map page sizing + new loader * perf: reduce costs by disabling /list image optimization * fix(UI): add 'content' id to root layout for map sheet * chore(UI): fix styles + add /help link in RootDrawer * feat(UI): migrate most of /list to radix-theme + pwa scroll fixes * feat(UI): migrate /map/[invaderName] to radix-themes * chore(UI): use radix-theme for carousel buttons * chore(UI): use radix-theme for SliderActions * feat(UI): use radix-theme in MapSheet * chore(UI): migrate UserMarker to radix-theme * chore(UI): migrate InvaderHit to radix-themes * fix(UI): bring scroll snap back for /list * feat(UI): use DropdownMenu radix-themes classes on radix MenuBar * feat(UI): migrate /list MenuBar to radix-themes * feat(UI): migrate SkeletonHit to radix-themes + random string ssr function * chore(UI): use new skeleton prop + radius fix + few ui tweaks * feat(UI): migrate /map page to radix-themes * fix: tweak MapSheet Header padding * chore(UI): migrate Card to radix-theme * feat: add shadow to Card component + better padding * chore(UI): migrate CardForm to radix-themes * feat(UI): migrate /account to radix-theme + FileInput component * feat: rework AuthButton for RootHeader * chore: add elevation to /list cards * feat: add shadow to root header + better AuthButton skeleton * feat(UI): revamp QR code drawer * chore(UI): migrate ReferralLink section to radix-theme * chore: ui fixes on RootDrawer and Drawer + LoginButton * feat(UI): migrate /account header to radix-theme * refactor: move /account header to its own component * chore: complete Carousel migration to radix-theme * feat(UI): migrate ReviewsSection to radix-ui * feat(UI): /account review section skeleton * feat: migrate ReviewCard to radix-theme * feat(UI): migrate EditModal to radix-theme * feat(UI): migrate invader history modal to radix-theme * perf: reduce root drawer open delay * feat(UI): added new desktop navigation menu (UI regression on iOS /list on drawer open) * fix(GPU): [temp] iOS Safari crash when opening drawer on /list * Upgrade React, Nextjs, NextAuth, Drizzle, vercel-postgres + fix local DB timeout + remove daisyUI (#73) * fix: AuthButton new props on instances * feat: use stable version for nextjs14 + react 19 * chore: update browserlist-lite * refacto: remove unused imports * refactor: remove unused components + move Single instance component closer to their page * feat: invader history skeleton * refacto: move Spinner image to public * feat: get rid of daisy-ui classes + many small ui fixs and tweaks * chore: remove daisyui from deps * fix: build warnings about css nesting * fix(/account): move server actions to proper files * fix: missing name for StateForm * fix(/map/[invaderName]): move server actions to proper files * chore: allow api access from browser in local * feat: upgrade auth.js drizzle @vercel/postgres + fix local db timeout + migration for users * [FEAT] Custom Theme Panel + Themed Map styles (#74) * feat(/map): [WIP] change map colors with theme ones * fix: wrong bg on map IconButtons * feat: mix grays and accent colors for dynamic map styles * feat(map): bigger gap between gray/accent colors * feat: added custom ThemePanel * fix: tricky fix for map untouchable after dialog close * fix: revert gap on RootDrawer items * fix: tweak dirty fix timeout * [FEATURE] map styles from current theme + custom theme panel (#75) * feat(/map): [WIP] change map colors with theme ones * fix: wrong bg on map IconButtons * feat: mix grays and accent colors for dynamic map styles * feat(map): bigger gap between gray/accent colors * feat: added custom ThemePanel * fix: tricky fix for map untouchable after dialog close * fix: revert gap on RootDrawer items * fix: tweak dirty fix timeout * [CHORE] use our radix-themes fork + Nextjs 15 upgrade (#76) * fix: use radix themes fork + upgrade next/react/vaul * chore: migrate import to use radix theme fork * chore: keep GET route handlers cached * fix: keep our app requests cached by defautlt * fix: keep client cache as it was in next14 * fix: migrate to @vercel/functions for ip geolocation * fix: wrong naming for route handlers config option * fix: remove deprecated Geo type * fix: use drizzle directly for sitemap generation + handle errors * fix: switch trustHost to true, don't really know why * feat: enable react-compiler + eslint plugin * fix: map types by avoiding using google global * fix: dark grays are no longer the light ones * fix: edge function timeout test * Revert "fix: edge function timeout test" This reverts commit 30ee7a6. * feat(notification): init novu * feat: add novu react basic implementation * fix: URL.canParse polyfill for nextjs dev overlay - the error only happen on safari <17 (iOS, macOS) - it is triggered by vercel/next.js@a5e2a02#diff-daba055a3db9875013f17e3c82552acb4a81cf3cabd60ca168a7263285afaf3dR18-R21 - don't know why nextjs default browserslist doesn't make the official polyfill load * feat: init notification center * fix: notification refresh by updating novu/react * feat: added basic notification center that works * feat: use real props for novu client provider * feat(notification): identify user to novu on login * feat(notification): added contribution review workflow * fix(edge): @novu/framework using crypto... * fix: weird random error about $$typeof it seems to be this one: vercel/next.js#69545 as suggested [here](vercel/next.js#69545 (comment)) a possible workaround could be to turn svgr components into client components * fix: another unknown bug about file upload could be JPG => AVIF conversion that fails or take too long
This is a follow-up from #30528 to not only handle props (the critical change), but also the owner ~and stack~ of a referenced element. ~Handling stacks here is rather academic because the Flight Server currently does not deduplicate owner stacks. And if they are really identical, we should probably just dedupe the whole element.~ EDIT: Removed from the PR. Handling owner objects on the other hand is an actual requirement as reported in vercel/next.js#69545. This problem only affects the stable release channel, as the absence of owner stacks allows for the specific kind of shared owner deduping as demonstrated in the unit test.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/mobeigi/react-next-svgr-bug
To Reproduce
yarn install
yarn dev
The repository provided is a barebones Next 15 + React 19 + Typescript + Yarn app created with
create-next-app
.It also has SVGR intregration via
@svfr/webpack
following instructions from here: https://react-svgr.com/docs/next/Current vs. Expected behavior
Behaviour
It is expected that both the good and bad pages from the reproduction repo will load fine without issue and refreshes should also load fine.
The good page (with only 1 distinct SVG) loads fine without issues.
However, the bad page (with 2+ distinct SVGs) only renders fine for initial load. A reload of the page triggers a crash and produces a (unhandled Runtime Error).
Exception
Example exception from Chrome:
Provide environment information
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I have confirmed this issue is present is version
15.0.0-canary.93
and all following versions.Version
15.0.0-canary.92
and earlier work without issues.React was set to
19.0.0-rc-e56f4ae3-20240830
for all tests (however, I tested many React 19 RC versions from 4 months ago to date and it seemed to not affect the occurrence of the bug).The text was updated successfully, but these errors were encountered: