I get this error when running my site after adding mdx support with yarn astro add mdx. Surprisingly, I wasn't able to find any solutions or even anyone reporting the same problem on the internet. Here's the full error if it'll help:
error addContentEntryType is not a function
TypeError: addContentEntryType is not a function
at astro:config:setup (file:///home/neon/dev/portfolio/node_modules/@astrojs/mdx/dist/index.js:18:9)
at async withTakingALongTimeMsg (file:///home/neon/dev/portfolio/node_modules/astro/dist/integrations/index.js:13:18)
at async runHookConfigSetup (file:///home/neon/dev/portfolio/node_modules/astro/dist/integrations/index.js:61:7)
at async dev (file:///home/neon/dev/portfolio/node_modules/astro/dist/core/dev/index.js:19:12)
at async startDevServer (file:///home/neon/dev/portfolio/node_modules/astro/dist/cli/index.js:131:35)
at async runCommand (file:///home/neon/dev/portfolio/node_modules/astro/dist/cli/index.js:166:7)
at async cli (file:///home/neon/dev/portfolio/node_modules/astro/dist/cli/index.js:188:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.```