New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with package path jsx-runtime updating Nextjs with React 18 #162
Comments
Seems like others are facing the same issue (e.g. kentcdodds/mdx-bundler#164). I need to investigate this more but it seems tricky since... // Only valid with React 17 and lower
import * as _jsx_runtime from 'react/jsx-runtime.js'
// Only valid with React 18 (and higher)
import * as _jsx_runtime from 'react/jsx-runtime' React 18 is now using the |
Thanks @schickling 😄 |
This was just released as part of the new Feel free to comment in case you're running into any problems or open a new issue. |
Anyone else still having troubles with it, after updating to latest release?
|
same error after upgrade to "next-contentlayer": "0.2.1":
|
Sorry for the inconvenience. I'm currently on vacation for the next 10 days but planning to look into it once I'm back! (If someone wants to help investigate fixes/solutions to this problem, I'd be happy to merge a PR in the meanwhile.) |
I just returned from vacation and looked into this issue again. I've cut a new If you're still running into problems (e.g. if Contentlayer broke for you when using React 17 or older) please don't hesitate to comment here :) |
I tried updating my website with React 18 (Nextjs v12.1.2) and not compiling.
The error is:
I tested changing the
jsx_runtime
import inuseMDXComponent
innode_modules
and compiled again.from:
to:
Working with this change without errors 😎 idk why...
I tried this change in the
contentlayer
repo (feat/0.2.0 branch),yarn build
andyarn test
and all tests passed 💯Can you check that?
The text was updated successfully, but these errors were encountered: