Skip to content
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

Default 404 route doesn't render root layout when using turbopack #60688

Closed
1 task done
rinald opened this issue Jan 15, 2024 · 1 comment · Fixed by #61032
Closed
1 task done

Default 404 route doesn't render root layout when using turbopack #60688

rinald opened this issue Jan 15, 2024 · 1 comment · Fixed by #61032
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked Turbopack Related to Turbopack with Next.js.

Comments

@rinald
Copy link

rinald commented Jan 15, 2024

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/epic-christian-frtl8t

To Reproduce

  1. Add the root layout
export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        <header style={{ height: 60, backgroundColor: "red" }} />
        {children}
      </body>
    </html>
  );
}
  1. Run the app in development mode (next dev and next dev --turbo)
  2. Access an unhandled route

Current vs. Expected behavior

The development server that uses Webpack (default) includes the root layout on the default 404 route
Screenshot 2024-01-15 at 23 10 50

The development server that uses Turbopack (next dev --turbo) doesn't include the root layout on the default 404 route
Screenshot 2024-01-15 at 23 10 58

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.0.5-canary.58
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router, Turbopack (--turbo)

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

No response

PACK-2241

@rinald rinald added the bug Issue was opened via the bug report template. label Jan 15, 2024
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label Jan 15, 2024
@ForsakenHarmony ForsakenHarmony added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Jan 16, 2024
timneutkens pushed a commit that referenced this issue Jan 24, 2024
### What?

This fixes 2 issues with app 404 pages.
1. The root layout in a group was previously ignored when hitting the
404 page.
2. The default app 404 page was missing the correct path for dev
`/not-found` so it would fall back to the pages 404 page.

Closes PACK-2241
Fixes #60688
Copy link
Contributor

github-actions bot commented Feb 8, 2024

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.

@github-actions github-actions bot added the locked label Feb 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants