Open uniunitaro opened 1 year ago
I've run into the same issue and wasted close to a day trying to figure out workarounds. Worse, it completely breaks libraries like chakra-react-select , as they try to retrieves properties from the theme that don't exist and throw "attempt to access property on undefined" errors.
The problem appears to still exist on 13.4.19.
@uniunitaro not sure if you ever found a satisfactory workaround.
Unfortunately I have not found a workaround. I really want to use Edge runtime, so I set runtime to nodejs only during development. Vercel members have not responded to this issue.:cry:
We're also having this issue. For people investigating the problem:
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/github/UniuniTaro/styles-bug-on-edge/main
To Reproduce
Describe the Bug
The issue occurs when using the Edge runtime and running the application in a local environment using
next dev
ornext start
. The styles break in these scenarios. However, when deploying the application on Vercel, the styles are displayed correctly during server-side rendering.Even after adding the
'use client'
directive in thepage.tsx
, the behavior remains the same.The problem could potentially be related to Emotion. However, it is unclear why the application functions correctly on Vercel.
There is uncertainty about whether the pages are statically generated. The presence of Edge Function logs in Vercel suggests that the pages might not be statically generated, as these logs are recorded for each access.
Expected Behavior
The same behavior is expected in the local environment and on Vercel.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
next start and Vercel