Open hamlim opened 4 months ago
I'll cross report to Next as well, just in case it's an issue on their end!
Added this comment on my Next.js related issue as well:
My hunch is that this code within that package is the problematic part: hashicorp/next-mdx-remote@17d6598/src/jsx-runtime.cjs#L11-L15
Are there any news on this? Were you able to figure something out?
I ended up effectively "forking" this package into our codebase to fix this issue - we weren't relying on too many core parts of the library and instead just needed to use MDX directly to transform the content on the fly.
Any fixes to share?
Next.js 15 same issue
using transpilePackages: ["next-mdx-remote"], in next config remove the error for nextjs 15 https://github.com/hashicorp/next-mdx-remote?tab=readme-ov-file#installation
I was running into the same issue using the portfolio template. Adding transpilePackages: ['next-mdx-remote']
to the next config solved the issue.
Describe the bug
I get the following error in development and in production when using
next-mdx-remote/rsc
within my Next.js application:My hunch is that it is because of the dynamic require of the
jsx-runtime
, however this could also be a bug in Next.Reproduction
https://github.com/hamlim/next-mdx-remote-jsx-runtime-bug
next-mdx-remote version
v5.0.0