@next/mdx fails when using remarkPlugins #80752
-
I'm trying to use TypeError: Cannot use 'in' operator to search for 'plugins' in null This is my next.config.mjs import createMDX from "@next/mdx"; const withMDX = createMDX({ const nextConfig = { export default withMDX(nextConfig); |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
import createMDX from "@next/mdx"; const withMDX = createMDX({ const nextConfig = { export default withMDX(nextConfig); |
Beta Was this translation helpful? Give feedback.
-
Try this change: JavaScript
JavaScript JavaScript
JavaScript const nextConfig = { export default nextConfig;
next.config.mjs /** @type {import('next').NextConfig} */ next.config.mjs const withMDX = createMDX({ JavaScript |
Beta Was this translation helpful? Give feedback.
-
Hi, You are likely running with In your "scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint"
}, You can remove the Another way to get |
Beta Was this translation helpful? Give feedback.
Hi,
You are likely running with
--turbopack
.In your
package.json
file, you'll see:You can remove the
--turbopack
, and it'll work. You should probably stick with this for now.Another way to get
--turbopack
to work, albeit experimentally, is withmdxRs: true
- depending on what you are trying to do, it might be acceptable, although, other things might break.