-
Notifications
You must be signed in to change notification settings - Fork 38
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
[BUG] Nesting Layouts with next-themes #511
Comments
@vicb Sorry, I missed go to http://localhost:8787/en Additionally, everything works fine if I don't use nested layouts. |
same issue It happens in production. When deploying to cloudflare. @vicb You need to go to the page with the error and do a refresh ![]() |
Note: The |
The cause cause of the issue here seems to be Would would be nice is to open an issue on the repo and ask for the value to be inlined at build time. What happens with the Cloudflare adapter is that we bundle the code into a single JS file for deployment using ESBuild. ESBuild add those |
Thank you for your work on this! However, it seems like this doesn't explain why the issue only arises when nested layouts are used. |
A potential fix for this: pacocoursey/next-themes#349 |
Describe the bug
I'm encountering an error in the preview when using nested layouts to handle multiple languages alongside next-themes (include inline script -> error)
repo: https://github.com/NavOrange/nesting-layouts-with-next-themes
__name(m3, "m3");
This code issue only appears after the opennextjs-cloudflare build process, and it seems the code has been formatted as well.
@opennextjs/[email protected], inline code is also formatted, but no unexpected code appears.
Steps to reproduce
http://localhost:8787/en
Expected behavior
No unexpected code
@opennextjs/cloudflare version
^0.6.0
Wrangler version
^4.5.0
next info output
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 24.3.0: Thu Jan 2 20:22:00 PST 2025; root:xnu-11215.81.4~3/RELEASE_X86_64 Available memory (MB): 16384 Available CPU cores: 12 Binaries: Node: 22.14.0 npm: 10.9.2 Yarn: N/A pnpm: 10.6.2 Relevant Packages: next: 15.2.4 // Latest available version is detected (15.2.4). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: 5.8.2 Next.js Config: output: N/A
Additional context
No response
The text was updated successfully, but these errors were encountered: