{"record":{"id":"65ef8dcd0f483b5b","repo":"withastro/astro","slug":"the-markdown-processor-processor-name-does-no","errorCode":null,"errorMessage":"The markdown processor \"${processor.name}\" does not provide MDX support. Implement `createMdxRenderer` on the processor to enable MDX rendering.","messagePattern":"The markdown processor \"(.+?)\" does not provide MDX support\\. Implement `createMdxRenderer` on the processor to enable MDX rendering\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/integrations/mdx/src/vite-plugin-mdx.ts","lineNumber":158,"sourceCode":"\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tconst compiled = await unifiedProcessor.process(vfile);\n\t\t\t\tconst astroMetadata = getAstroMetadata(vfile);\n\t\t\t\tif (!astroMetadata) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Internal MDX error: Astro metadata is not set by rehype-analyze-astro-metadata',\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tcode: String(compiled.value),\n\t\t\t\t\tmap: compiled.map ? JSON.stringify(compiled.map) : null,\n\t\t\t\t\tastroMetadata,\n\t\t\t\t};\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error(\n\t\t`The markdown processor \"${processor.name}\" does not provide MDX support. ` +\n\t\t\t`Implement \\`createMdxRenderer\\` on the processor to enable MDX rendering.`,\n\t);\n}\n","sourceCodeStart":140,"sourceCodeEnd":163,"githubUrl":"https://github.com/withastro/astro/blob/3578d45d34226d63cff3d261c971c221de6794d2/packages/integrations/mdx/src/vite-plugin-mdx.ts#L140-L163","documentation":"@astrojs/mdx does not compile MDX itself: it asks the active markdown processor for an MDX renderer via its createMdxRenderer method (vite-plugin-mdx iterates the configured processors). If the processor that handles markdown does not implement createMdxRenderer, there is no way to render .mdx files, so the Vite plugin throws this error at build/dev time.","triggerScenarios":"astro.config sets a custom markdown processor (e.g. a Markdoc-style or internal processor) that only implements createRenderer; a third-party processor package built against an older processor API; version drift where @astrojs/mdx expects createMdxRenderer but the processor package predates it.","commonSituations":"Combining @astrojs/mdx with a custom or experimental markdown processor; integrations that swap the processor under the hood; upgrading @astrojs/mdx ahead of the processor package.","solutions":["Implement createMdxRenderer on the custom processor; it must return a renderer whose render() resolves { code, map, astroMetadata }","Update the processor package to a version that provides createMdxRenderer","Remove the custom markdown processor so the default processor (which supports MDX) is used","If MDX support is not needed, remove @astrojs/mdx from the integration list"],"exampleFix":"// before\nconst processor = { name: 'my-processor', createRenderer() { /* markdown only */ } };\n// after\nconst processor = {\n  name: 'my-processor',\n  createRenderer() { /* markdown path */ },\n  createMdxRenderer(processor) {\n    return {\n      async render(source, opts) {\n        const compiled = await compileMdx(source, opts);\n        return { code: String(compiled.value), map: compiled.map ? JSON.stringify(compiled.map) : null, astroMetadata };\n      },\n    };\n  },\n};","handlingStrategy":"type-guard","validationCode":"// In astro.config before adding @astrojs/mdx:\nfunction supportsMdx(p: any): boolean {\n  return typeof p?.createMdxRenderer === 'function';\n}\nif (!supportsMdx(resolvedProcessor)) {\n  throw new Error(`processor ${resolvedProcessor.name} cannot render MDX; skipping @astrojs/mdx`);\n}","typeGuard":"function supportsMdx(p: unknown): p is { createMdxRenderer: (processor: unknown) => unknown } {\n  return typeof (p as any)?.createMdxRenderer === 'function';\n}","tryCatchPattern":"try {\n  await import('@astrojs/mdx').then((m) => m.default());\n} catch (err) {\n  if (String(err?.message).includes('does not provide MDX support')) {\n    // fall back to running without MDX files\n  } else throw err;\n}","preventionTips":["Keep astro, @astrojs/mdx, and the processor package upgraded together","Smoke-test the config with one .mdx page before adding MDX across the site","Assert createMdxRenderer exists in the processor's exported types"],"tags":["mdx","markdown-processor","config","vite-plugin"],"backgroundTag":"unsupported-processor-capability","analyzedSha":"3578d45d34226d63cff3d261c971c221de6794d2","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}