Closed
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
https://mdxjs.com/guides/mdx-on-demand/
Link to runnable example
Steps to reproduce
cd client
yarn dev
Expected behavior
I expect run & compile to work.
Actual behavior
There are a couple places in the docs that use:
import * as runtime from 'react/jsx-runtime.js'
However, when I try to replicate the code, I get the following error:
Error: Package subpath './jsx-runtime.js' is not defined by "exports" in /path/node_modules/react/package.json
I'm using React v^18.2.0 and I can't downgrade my React version. Is there something else I can provide as the second argument of run
to get it to work? I see the run API documentation says I can provide "jsx, jsxs, and Fragment from an automatic JSX runtime as options", but I have no idea what that means. Do I provide a string(e.g. 'jsx')? Do I import something? I upload this as an issue because I think the docs need improvement and if anyone can show me the light, I'd be more than willing to make a PR fixing it as well :)
Runtime
Node v17
Package manager
yarn v1
OS
macOS
Build and bundle tools
Next.js