Closed MwirabuaTimothy closed 6 months ago
Also whenever I add other remark plugins, @astro/mdx crushes with the same error.
So I have to first uninstall @astro/mdx and remove it from the astro.config.ts, complete adding and testing the other remark plugin, then come back and install @astro/mdx using the npx astro add mdx
I'm not able to replicate this. Are you able to share your repo, or a minimal reproduction? I'll close this issue as it doesn't seem this isn't related to the docs. Feel free to continue discussing with me here, or join our Discord to share in our support channels.
Hey, we had same issue with our project. After investigation we've found out that the problem was on our side, we've added a mdx integration with:
pnpm astro add mdx
But we also had a line in .npmrc
with:
strict-peer-dependencies=false
Which in result caused ignoring peerDependencies
property on package.json
, that in result pulled latest @astrojs/mdx
which didn't work because we had an astro version set to 4.5.1
.
If you have same issue either upgrade your astro
to ^4.8.0
or downgrade @astrojs/mdx
.
Every time I install @astro/mdx using the manual process I get the error below:
I have to use automatic way of
npx astro add mdx
plus I have to have rehype installed as a dev dependency otherwise I get the same error above.