Open niklaswallerstedt opened 1 month ago
Another solution is to use next-mdx-remote
instead of this https://contentlayer.dev/docs/sources/files/mdx-d747e46d#app-directory
import { MDXRemote } from 'next-mdx-remote/rsc';
...
<MDXRemote source={post.body.raw} components={customComponents} />
Hi @niklaswallerstedt, thanks for the example repo. I tried it out and notice that it works if installed with npm or yarn, but I am not sure what's the issue with the resolution that results in the error for pnpm.
I haven't tested with npm or yarn yet but I'll give it a go.
Just to clarify this started from v0.5.0 and if you downgrade contentlayer2 it should still work. At least in my project going to verify in the repro as well
Hey @timlrx. First off, thanks a lot for maintaining this fork. After upgrading past 0.5.0 I'm starting to get these errors
I've narrowed it down to my monorepo resolving
react
/react-dom
to18.2.0
. If I override the resolved version it works again. While it may not be something on your end to fix, just reporting it in case there is something that can be fixed.I pulled out bits and pieces from another repo in a reproduction.
Node: v18.20.4