Skip to content
Discussion options

You must be logged in to vote

2 f--ing days of my life!
"Fixed" it, it's got to be a bug in nextjs.

chased it down to ./app/app/layout.tsx

if the contents of the file is

export default function DashboardLayout({
  children
}: {
  children: React.ReactNode;
}) {
  return children;
}

it breaks everything (only in production)

but if I change it to a JSX file and the contents to

export default function DashboardLayout({
  children
}) {
  return children;
}

it works absolutely fine.

I will report this as a bug in Next,

EDIT: I fixed it in my repo but am unable to reproduce the fix in a example repo? the broken page is still there?
https://github.com/dymoo/next-docker-layoutbroken-example

EDIT 2: #65380

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@dymoo
Comment options

@solo-samurai
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@popovidis
Comment options

@dymoo
Comment options

@popovidis
Comment options

Answer selected by dymoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants