Next.js Discord

Discord Forum

Type error: Cannot find module 'file.mdx' or its corresponding type declaration

Unanswered
Boreal Chickadee posted this in #help-forum
Open in Discord
Avatar
Boreal ChickadeeOP
Getting this error after upgrading to 15.1 - but it was working fine before and I have an mdx.d.ts with the proper declaration

1 Reply

Avatar
Boreal ChickadeeOP
import { JSX } from 'react';

declare module '*.mdx' {
  let MDXComponent: (props) => JSX.Element;
  export default MDXComponent;
}