Skip to content

[BUG] Nesting Layouts with next-themes #511

@relkrahs

Description

@relkrahs

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

Image Image

__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

  1. clone code
  2. cd nesting-layouts-with-next-themes && pnpm install
  3. pnpm preview
  4. open browser
  5. go to http://localhost:8787/en
  6. open console

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions