#addContentEntryType is not a function

1 messages · Page 1 of 1 (latest)

sage nebula
#

Tried to install the mdx integration, and after trying to launch dev mode, I got this error:

 error   addContentEntryType is not a function
  File:
    D:\personal-site-astro\node_modules\@astrojs\mdx\dist\index.js:23:9
  Code:
    22 |         addPageExtension(".mdx");
    > 23 |         addContentEntryType({
         |         ^
      24 |           extensions: [".mdx"],
      25 |           async getEntryInfo({ fileUrl, contents }) {
      26 |             const parsed = parseFrontmatter(contents, fileURLToPath(fileUrl));
  Stacktrace:
TypeError: addContentEntryType is not a function
    at Object.astro:config:setup (file:///D:/personal-site-astro/node_modules/@astrojs/mdx/dist/index.js:23:9)
    at async withTakingALongTimeMsg (file:///D:/personal-site-astro/node_modules/astro/dist/integrations/index.js:15:18)
    at async runHookConfigSetup (file:///D:/personal-site-astro/node_modules/astro/dist/integrations/index.js:69:7)
    at async createContainer (file:///D:/personal-site-astro/node_modules/astro/dist/core/dev/container.js:27:14)
    at async createContainerWithAutomaticRestart (file:///D:/personal-site-astro/node_modules/astro/dist/core/dev/restart.js:90:28)
    at async dev (file:///D:/personal-site-astro/node_modules/astro/dist/core/dev/dev.js:10:19)
    at async runCommand (file:///D:/personal-site-astro/node_modules/astro/dist/cli/index.js:138:7)
    at async cli (file:///D:/personal-site-astro/node_modules/astro/dist/cli/index.js:176:5)

error Command failed with exit code 1.
eager spade
#

What version of Astro are you using?

sage nebula
#

I'm currently not at home, I will update as soon as I get back

sage nebula
eager spade
#

Ah, in which case you can either upgrade to Astro 2.1 or downgrade the MDX integration

sage nebula
#

Alright, thanks!

#

Ran yarn add astro@latest, and then got this error:

error   Cannot read properties of undefined (reading 'postcss')
  File:
    D:\personal-site-astro\node_modules\<@&1055234544183287879>\tailwind\dist\index.js:78:22
  Code:
    77 |         const tailwindConfig = (userConfig == null ? void 0 : userConfig.value) ?? getDefaultTailwindConfig(config.srcDir);
    > 78 |         config.style.postcss.plugins.push(tailwindPlugin(tailwindConfig));
         |                      ^
      79 |         config.style.postcss.plugins.push(autoprefixerPlugin);
      80 |         if (applyBaseStyles) {
      81 |           injectScript("page-ssr", `import '<@&1055234544183287879>/tailwind/base.css';`);
  Stacktrace:
TypeError: Cannot read properties of undefined (reading 'postcss')
    at Object.astro:config:setup (file:///D:/personal-site-astro/node_modules/<@&1055234544183287879>/tailwind/dist/index.js:78:22)
    at async withTakingALongTimeMsg (file:///D:/personal-site-astro/node_modules/astro/dist/integrations/index.js:16:18)
    at async runHookConfigSetup (file:///D:/personal-site-astro/node_modules/astro/dist/integrations/index.js:77:7)
    at async createContainer (file:///D:/personal-site-astro/node_modules/astro/dist/core/dev/container.js:31:14)
    at async createContainerWithAutomaticRestart (file:///D:/personal-site-astro/node_modules/astro/dist/core/dev/restart.js:90:28)
    at async dev (file:///D:/personal-site-astro/node_modules/astro/dist/core/dev/dev.js:31:19)
    at async runCommand (file:///D:/personal-site-astro/node_modules/astro/dist/cli/index.js:152:7)
    at async cli (file:///D:/personal-site-astro/node_modules/astro/dist/cli/index.js:203:5)

error Command failed with exit code 1.
sick vortex