Skip to content

Error occurred prerendering page "/api-doc" - Next 13 (npm) #814

Closed Answered by jashdubal
jashdubal asked this question in Q&A
Discussion options

You must be logged in to vote

Problem was resolved by adding a layout.tsx file to the api-docs folder:

export const metadata = {
    title: 'Next.js',
    description: 'Generated by Next.js',
  }
  
  export default function RootLayout({
    children,
  }: {
    children: React.ReactNode
  }) {
    return (
        // make this entire page dark mode
      <html lang="en">
        <body>{children}</body>
      </html>
    )
  }

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@thanmay-pg
Comment options

@jellydn
Comment options

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