mdx Missing typings and typescript files from `@mdx-js/mdx` - JavaScript

Subject of the issue

Missing typescript files and typings from @mdx-js/mdx.

I have installed version "@mdx-js/mdx": "^1.6.22", but I cannot see any typings.

If I look into my node_modules folder, this is the output:

Screenshot 2021-05-12 at 15 32 22

There is no TypeScript nor .d.ts files.

Steps to reproduce

  1. I create an empty folder
  2. I run yarn init -y
  3. I do a yarn add -D @mdx-js/mdx
  4. I try import a default export or a named export
  5. TSC compiler throws an error: Could not find declaration files for @mdx-js/mdx, etc...

Screenshot 2021-05-12 at 15 41 50

Asked Oct 18 '21 06:10
avatar floroz

3 Answer:

The documentation you are looking at is for version 2. Either run version 2 (see for more info) Or follow the guide for version 1

Answered May 12 '21 at 13:44
avatar  of ChristianMurphy

I can see the Typings being referenced both in the documentation: and in the source code:

Answered May 12 '21 at 13:43
avatar  of floroz

hey there, just ran into this as well -- maybe the website should note somewhere that the documentation is for a pre-release version and won't work as described?

Answered Aug 25 '21 at 06:02
avatar  of lostfictions