#TypeError: addContentEntryType is not a function

19 messages ยท Page 1 of 1 (latest)

lime mesa
#

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.```
unkempt iris
#

<@&1076031741673873448> Can someone please look into this and see whether we're having an issue in general with yarn astro add mdx or the mdx integration? Thanks!

twilit wolf
#

I don't seem to be able to replicate this. Could you share your Astro config?

lime mesa
#

there!

twilit wolf
#

hmm, that looks fine to me. unless the issue is somewhere else, I can't see a problem ๐Ÿค” is the code for your project public by chance?

lime mesa
twilit wolf
#

thanks. I'll give this a go and see what I find

lime mesa
#

alr!

drowsy moss
#

Still looking for a cause

twilit wolf
#

aha, astro is outdated. the function shown in the error doesn't exist until Astro 2.x.x (don't know the exact version)

#

you'll have to update Astro to use the MDX integration

#

and good news, it looks like it runs perfectly fine on the latest version with 0 changes

lime mesa
#

alright, it works now!

#

Thank you!

eager saddle
unkempt iris
#

So blame me for my intentions all you want, but yes, it was intentional! ๐Ÿ˜