Using `export * from '...'` in a page is disallowed.
joey00072 opened this issue · comments
error - ./src/pages/posts/markdown-syntax.mdx:7:1
Syntax error: Using `export * from '...'` in a page is disallowed. Please use `export { default } from '...'` instead.
Read more: https://err.sh/next.js/export-all-in-page
No tsx file has `export * from '...' and still getting error
I am trying to run master brach without any modification
Yeah im having the same problem, think this repo is fairly outdated now so not sure why its still the recommended starter from netlify cms
To fix this issue is possible and actually quite simple, the short answer is that you have to update the package next-mdx-enhanced
and make some changes in component within src/layouts/index.tsx
.
The change in the code is needed because that package converts mdx into components props and it has altered it's way to render said components from this:
export default function Layout(frontMatter) {
return ({ children: content }) => {
return (
<div>
<h1>{frontMatter.title}</h1>
{content}
</div>
)
}
}
To this:
export default function DocsPage({ children, frontMatter }) {
return (
<div>
<h1>{frontMatter.title}</h1>
{children}
</div>
)
}
After this changes you should be good to go. 😄