Skip to content

Nextra v4.3 app fails to build on Next v15.4.5 #4742

@tubbo

Description

@tubbo

Describe the bug

This error (or something similar) occurs when you build a Nextra application using a freshly generated Next.js application and use the example from https://nextra.site/docs/docs-theme/start#create-the-root-layout as your layout

Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Cannot find module './placeholder.js?lang='
    at <unknown> (.next/server/chunks/3742.js:1:118)
    at async e (.next/server/chunks/3414.js:73:112712)
    at async l (.next/server/chunks/3742.js:1:1895) {
  code: 'MODULE_NOT_FOUND',
  digest: '3034110460'
}

I don't see anything weird happening in development, though I haven't tried actually hitting the 404 page.

To Reproduce

  1. Generate a new Next.js app with yarn create next-app on Node v22
  2. Install both theme plugins with yarn add nextra-theme-docs nextra-theme-blog
  3. Replace the contents of app/layout.tsx with the example on https://nextra.site/docs/docs-theme/start#create-the-root-layout
  4. See error

Desktop (please complete the following information):

  • OS: macOS Sonoma v14.7
  • Browser Safari
  • Version latest

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions