Skip to content

Getting a "Maximum call stack size exceeded" error on Nextra and Nextra-Theme-Docs v2-beta.41 #965

Answered by dimaMachina
jerembdn asked this question in Q&A
Discussion options

You must be logged in to vote

First, there is no longer Component.getLayout and you don't need to import nextra-theme-docs/style.css, your app.tsx should contain instead:

import { AppProps } from 'next/app'
import '../styles/global.css'

export default function MyApp({ Component, pageProps }: AppProps) {
  return <Component {...pageProps} />
}

Second, you have incorrect import in index.mdx that produce Maximum call stack size exceeded error

-import Bleed from 'nextra-theme-docs'
+import { Bleed } from 'nextra-theme-docs'

also, you don't need to declare types in theme.ts just import DocsThemeConfig from nextra-theme-docs

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@dimaMachina
Comment options

@jerembdn
Comment options

@jerembdn
Comment options

@dimaMachina
Comment options

@jerembdn
Comment options

Comment options

You must be logged in to vote
1 reply
@jerembdn
Comment options

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