Getting a "Maximum call stack size exceeded" error on Nextra and Nextra-Theme-Docs v2-beta.41 #965
-
This error happens only when a .mdx file has a Here is the error i'm getting:
Node v16 /* eslint-disable @typescript-eslint/no-var-requires */
const nextra = require("nextra");
/**
* @type {import("nextra").NextraConfig}
*/
const config = {
theme: "nextra-theme-docs",
themeConfig: "./theme.config.js",
unstable_flexsearch: true,
unstable_staticImage: true,
};
const withNextra = nextra(config);
module.exports = withNextra({
compiler: {
styledComponents: true,
},
}); |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hi! Could you provide a reproduction repo ? |
Beta Was this translation helpful? Give feedback.
-
First, there is no longer 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 -import Bleed from 'nextra-theme-docs'
+import { Bleed } from 'nextra-theme-docs' also, you don't need to declare types in |
Beta Was this translation helpful? Give feedback.
First, there is no longer
Component.getLayout
and you don't need to importnextra-theme-docs/style.css
, yourapp.tsx
should contain instead:Second, you have incorrect import in
index.mdx
that produceMaximum call stack size exceeded
erroralso, you don't need to declare types in
theme.ts
just importDocsThemeConfig
fromnextra-theme-docs