Skip to content

With full latest setup (Next.js 15.2.x + next-mdx-remote 5.0.0), cannot use RSC mode at all. #488

@LumaKernel

Description

@LumaKernel

Describe the bug

Simply just follow the instruction on https://nextjs.org/docs/pages/building-your-application/configuring/mdx#remote-mdx, and try rendering the MDX including math inline (like $1 + 1 = 2$) anything like # Hello, you'll see the error.

Image
....
 GET / 500 in 711ms
kj ⨯ [TypeError: Cannot read properties of undefined (reading 'stack')] {
  digest: '3975977629'
}
 ⨯ [Error: failed to pipe response] {
  [cause]: [TypeError: Cannot read properties of undefined (reading 'stack')] {
    digest: '3975977629'
  }
}
 GET / 500 in 835ms

Cannot do the simplest thing as following.

import { MDXRemote } from "next-mdx-remote/rsc";

export default function RemoteMdxPage() {
  const mdxText = "# Hello";
  return <MDXRemote source={mdxText} />;
}

It seems like a fatal error, completely nothing will be shown in the browser.

Reproduction

https://github.com/LumaKernel/nextjs-issue-mdx-remote-rsc

next-mdx-remote version

5.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions