Open hamlim opened 3 months ago
Seems like 15.0.0-canary.38
(and later canaries) is where the above error starts to show up, from 15.0.0-canary.0
- 15.0.0-canary.37
the error I get is the below error:
Package next-mdx-remote (serverExternalPackages or default list) can't be external
The request next-mdx-remote/rsc matches serverExternalPackages (or the default list), but it can't be external:
The package seems invalid. require() resolves to a EcmaScript module, which would result in an error in Node.js.
My hunch is that this code within that package is the problematic part: https://github.com/hashicorp/next-mdx-remote/blob/17d6598d4cbb9ccf0fe1042253649d88d685fa5f/src/jsx-runtime.cjs#L11-L15
Link to the code that reproduces this issue
https://github.com/hamlim/next-mdx-remote-jsx-runtime-bug
To Reproduce
bun install
cd apps/docs
bun run dev
Current vs. Expected behavior
I see the following error:
Ideally - I wouldn't get any error!
Provide environment information
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
I've tested this in several Next 15 canaries, haven't been able to bisect releases to find out when this might have changed just yet.
I've also cross reported to the
next-mdx-remote
project here: https://github.com/hashicorp/next-mdx-remote/issues/467