kentcdodds/mdx-bundler

`MDXContentProps` type error fails Next.js build

vladmoroz opened this issue · 0 comments

  • mdx-bundler version: 9.0.1
  • node version: 14.17.5
  • npm version: 6.14.14

Relevant code or config:

import { bundleMDX } from 'mdx-bundler';

What you did:

next build

What happened:

Failed to compile.

../../common/temp/node_modules/.pnpm/mdx-bundler@9.0.1_esbuild@0.14.29/node_modules/mdx-bundler/dist/types.d.ts:197:36
Type error: Cannot find name 'MDXContentProps'.

  195 |   Frontmatter = {[key: string]: unknown},
  196 | > = {
> 197 |   default: React.FunctionComponent<MDXContentProps>
      |                                    ^
  198 |   frontmatter: Frontmatter
  199 | } & ExportObject
  200 | 

Problem description:

MDXContentProps type is missing from dist/types.d.ts, which fails the Next.js build in my case.