Skip to content

Adding the latest markdown satteri package raises the error that "@astrojs/markdown-satteri is too old to render .mdx files." #18014

Closed

Description

@hhofner

Astro Info

Astro                    v7.2.9
Vite                     v8.2.2
Node                     v24.5.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/mdx (v8.0.1)
                         @astrojs/react (v6.0.5)

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I am porting a blog post to a newer Astro 7 ("astro": "^7.2.9", to be exact) blog, and when adding MDX via npx astro add mdx it tells me that

@astrojs/markdown-satteri is too old to render .mdx files. Update it to the latest version — a ^ range on an older version will not pick it up:
  npm install @astrojs/markdown-satteri@latest

I try then to install the latest and it seems that I do have the latest. Is it an issue with the content?

Here's the MDX blog post, let me know if the React components are also useful:

---
title: "Balatro: My latest obsession"
tags: ["personal", "games", "animation"]
description: "About the award winning card game"
pubDate: "2025-01-19"
---

import Card from "./Card.tsx";

![Cover for the game Balatro](./balatro-hero.jpg)

[Balatro](https://www.playbalatro.com/) is a card game that has taken the internet by storm as of late. Like many others, I quickly 
became addicted to its simple yet endlessly engaging mechanics. For about $10 or so (on the app store), 
you're getting a ridiculous amount of value and playtime.

Balatro is written with the Löve game engine, which really motivates me to make a game myself. Prior to knowing of Balatro, 
I had this notion that to make a decent game, you need to invest time and effort in learning languages like C++ or Java, and
engines like Unity and what not. I was aware of 2D game engines but a lot of the discourse online was that 
most developers just end up using Unity.

![Screen of Balatro gameplay](./balatro-play.jpg)

But it is often said that it's not about what language or engine- it's about the execution. And Balatro was executed perfectly.
The game works like this: you have to beat "bosses" or blinds as they're called (poker lingo, I suppose). To do that,
you have to collect a number of points which is done by playing sets of cards (or "hands"). Each card gives you some
number of points, typically its number, and for each particular set you can receive extra points (for example, a flush: 5 cards
with the same *suit*, more poker lingo). The catch is, there are extra "power ups" you can apply to any card, and more
importantly, you can buy cards called "Jokers", which give you some type of conditional power. There is also money involved,
to buy said cards. The bosses also even have some tricks up their own sleeve.
I suggest you read [Wikipedia's description of it](https://en.wikipedia.org/wiki/Balatro_(video_game)#Playthrough) if you're
not convinced.

What I love most about Balatro though, are its interactions. The subtle hover styles, the "springyness" every time you touch a card, or when a card
is scored, is all intoxicating, and I wonder if it is what brings us all back for another round.

<Card client:load/>

<small>My small rendition of a point score interaction ☝️</small>

(heres the blog post: https://codeberg.org/haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaans/electric_eel/src/branch/main/src/posts/balatro%20copy)

What's the expected result?

It should render something.

Link to Minimal Reproducible Example

https://codeberg.org/haaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaans/electric_eel/src/branch/main/src/posts/balatro%20copy

Participation

  • I am willing to submit a pull request for this issue.

Activity

  1. added
    triage: in progress
    on Sep 16, 2026
  2. astro-factory commented on Sep 16, 2026

    @astro-factory
    Contributor

    Triage complete

    • Prepare the workspace: ready
    • Install dependencies: complete
    • Build the project: complete
    • Reproduce the issue: confirmed
    • Diagnose the cause: high confidence
    • Verify the diagnosis: bug
    • Attempt a fix: verified
    • Publish the result: set triage: fix pending

    • Reproduced: Yes — [email protected] + @astrojs/[email protected] fails with the reported error on any .mdx file.
    • Exploration: Yes — View branch
    • Unit Test: No — the primary fix is a peer dependency metadata change (package.json), which isn't testable at runtime. The error message is in a non-exported internal function.
    • Priority: P2: has workaround. Updating to [email protected] or later resolves the issue. The bug only affects users who installed @astrojs/[email protected] while pinned to [email protected]–7.2.9.

    The root cause is a too-loose peer dependency in @astrojs/mdx: it declares "astro": "^7.2.6" but actually requires [email protected]+, which is the first version to bundle @astrojs/[email protected] (the version that introduced createMdxRenderer). Versions 7.2.6–7.2.9 bundle @astrojs/[email protected], which lacks that method. The error message also misleadingly suggests npm install @astrojs/markdown-satteri@latest, which doesn't help because astro pins its own nested copy.

    I found a potential fix for this issue. The fix tightens the astro peer dep in @astrojs/mdx from ^7.2.6 to ^7.2.10 and updates the error message to suggest updating astro (which bundles the processor) rather than just the processor package alone.

    Immediate workaround: Update astro to 7.2.10 or later (npm install astro@latest).

    Try this fix

    You can test this fix right now without waiting for a release:

    # @astrojs/mdx
    npm i https://pkg.pr.new/@astrojs/mdx@033c51a

    If this fixes your issue, please leave a comment letting us know (for example
    "confirmed, this fixes it"). A pull request will then be opened to get it merged.

    Full Triage Report

    Issue Title

    Adding the latest markdown satteri package raises the error that "@astrojs/markdown-satteri is too old to render .mdx files."

    Environment Details

    • Astro: v7.2.9
    • @astrojs/mdx: v8.0.1
    • @astrojs/react: v6.0.5
    • Node: v24.5.0
    • Package Manager: npm
    • OS: macOS (arm64)

    Steps to Reproduce

    1. Create a new project with [email protected], @astrojs/[email protected], and @astrojs/[email protected]
    2. Configure astro with mdx() and react() integrations
    3. Create any .mdx file (even a minimal one)
    4. Run astro build

    Expected Result

    The MDX page should render successfully.

    Actual Result

    Build fails with:

    `@astrojs/markdown-satteri` is too old to render `.mdx` files. Update it to the latest version — a `^` range on an older version will not pick it up:
      npm install @astrojs/markdown-satteri@latest
    

    Root Cause

    The bug is caused by a too-loose peer dependency range in @astrojs/mdx. The MDX integration declares "astro": "^7.2.6" as a peer dependency, but it requires createMdxRenderer on the markdown processor — a method that only exists in @astrojs/[email protected]+. The astro package bundles @astrojs/markdown-satteri as a pinned direct dependency, and only [email protected]+ bundles 0.4.0 or later.

    Dependency chain

    Code path

    1. Astro core config schema (packages/astro/src/core/config/schemas/base.ts, line ~396) creates the default processor via satteri() from its bundled @astrojs/[email protected]
    2. MDX integration receives this processor (packages/integrations/mdx/src/index.ts, line ~157) via config.markdown.processor
    3. MDX vite plugin (packages/integrations/mdx/src/vite-plugin-mdx.ts, line ~114) checks processor.createMdxRenderer — which is undefined on 0.3.8 — and throws

    Why the suggested fix doesn't work

    The error tells users to npm install @astrojs/markdown-satteri@latest. This installs 0.4.1 at the top level, but npm keeps astro's nested 0.3.8 because astro pins it at an exact version. The processor continues to come from the nested 0.3.8.

    Publication timeline

    Package Published @astrojs/markdown-satteri version
    [email protected] 2026-08-27 0.3.8 (no createMdxRenderer)
    @astrojs/[email protected] 2026-08-31 requires ^0.4.0
    [email protected] 2026-08-31 0.4.0 (has createMdxRenderer)

    Verification

    Fix Applied

    Two changes in packages/integrations/mdx/:

    1. Tightened peer dependency range (package.json): Changed "astro": "^7.2.6" to "^7.2.10" — the minimum version bundling a compatible @astrojs/markdown-satteri.
    2. Improved error message (src/vite-plugin-mdx.ts): Now suggests npm install astro@latest @astrojs/markdown-satteri@latest instead of just the processor package.

    All 8 MDX satteri integration tests and 44 MDX unit tests pass after the fix.

    This report was made by an LLM. The analysis may be wrong, and the potential fix might not work, but is intended as a starting point for exploring the issue.

  3. added
    - P2: has workaround
    pkg: mdx
    triage: fix pending
    and removed
    triage: in progress
    on Sep 16, 2026
  4. self-assigned this
    on Sep 16, 2026
  5. Princesseuh commented on Sep 16, 2026

    @Princesseuh
    Member

    confirmed, this fixes it

  6. added
    triage: fix verified
    and removed
    triage: fix pending
    on Sep 16, 2026
  7. astro-factory commented on Sep 16, 2026

    @astro-factory
    Contributor

    The fix has been verified! A pull request has been created: #18036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

- P2: has workaroundpkg: mdxtriage: fix verified

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions