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:
There is no TypeScript nor .d.ts
files.
Steps to reproduce
- I create an empty folder
- I run
yarn init -y
- I do a
yarn add -D @mdx-js/mdx
- I try import a default export or a named export
- TSC compiler throws an error: Could not find declaration files for @mdx-js/mdx, etc...
3 Answer:
The documentation you are looking at is for version 2. Either run version 2 (see https://github.com/mdx-js/mdx/issues/1041 for more info) Or follow the guide for version 1 https://github.com/mdx-js/mdx/blob/master/docs/advanced/typescript.mdx
I can see the Typings being referenced both in the documentation: https://mdxjs.com/advanced/typescript#typings-for-mdx-imports and in the source code: https://github.com/mdx-js/mdx/tree/main/packages/mdx/types
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?
Read next
- Change OTLP gRPC port number - agent
- keras TensorBoard write_grads prevents training from starting - Python
- [Bug] Unable to use the Firebase Resize Image Extension when uploading from the Unity SDK - quickstart-unity
- firejail prevents Firefox from deactivating screen dimming during video watch C
- PowerToys Keyboard remapping works after the fact C#
- [FEATURE] Auto restart of prometheus-msteams pod when the entry from hashicorp vault is synced - prometheus-msteams
- ShareX Screen recording options (virtual-audio-capturer) - no work C#
- swoole-src swSocket_set_buffer_size#329: setsockopt(4, SOL_SOCKET, SO_SNDBUF, 8388608) failed. Error: No buffer space available[55]. - Cplusplus