Closed j-sup closed 6 months ago
Hi there, can you provide a minimal reproduction repo or codesandbox? That'll make it much easier for us to debug and triage 🙏
Hi there, can you provide a minimal reproduction repo or codesandbox? That'll make it much easier for us to debug and triage 🙏
Take a look here: https://github.com/j-sup/mdx-issue -- same error.
Facing the exact same issue. Reproduction can be found here: https://github.com/tobias-tengler/blog
Hey, @BRKalow, do you have thoughts?
hey did you find a solution? facing the same problem right now
Can we spend some time on this issue. My app was almost ready to get shipped and facing this error :(
Facing the exact same issue.
The issue is not related with the next-mdx-remote
but remark-prism
itself, since it is not compatible with unified Pluggable
Type 'Prism' is not assignable to type 'Pluggable'.
Type 'Prism' is not assignable to type 'Plugin<any[], any, any>'.
The 'this' types of each signature are incompatible.
Type 'Processor<undefined, undefined, undefined, undefined, undefined>' is not assignable to type 'Processor<void, void, void, void>'.
Types of property 'use' are incompatible.
Type '{ <Parameters_2 extends unknown[] = [], Input extends string | Node | undefined = undefined, Output = Input>(preset?: Preset | null | undefined): Processor<undefined, undefined, undefined, undefined, undefined>; <Parameters_2 extends unknown[] = [], Input extends string | ... 1 more ... | undefined = undefined, Outp...' is not assignable to type '{ <PluginParameters extends any[] = any[], Input = Node<Data>, Output = Input>(plugin: Plugin<PluginParameters, Input, Output>, ...settings: PluginParameters | [...]): UsePlugin<...>; <PluginParameters extends any[] = any[], Input = Node<...>, Output = Input>(tuple: [...] | [...]): UsePlugin<...>; (presetOrList: Pre...'.
Types of parameters 'preset' and 'plugin' are incompatible.
Type 'Plugin<any, any, any>' has no properties in common with type 'Preset'.ts(2322)
The error above explains that remark-prism
has to be updated according to latest updates in unified
and remark
ecosystem.
You can test the problem with importing the type import("unified").PluggableList
:
const remarkPlugins: import("unified").PluggableList = [
require("remark-prism"),
];
Closing as this appears to be an issue with remark-prism
.
packages:
next.js config:
page:
when I try to access the page in dev, I get this error: