marked icon indicating copy to clipboard operation
marked copied to clipboard

Importing 4.0.10 in TypeScript makes TypeScript wonder its existence and where the files are

Open Coreusa opened this issue 3 years ago • 3 comments

Marked version: 4.0.10

Describe the bug Used 4.0.0 before and that worked. Upgraded to 4.0.10 and ship went sideways - fast. I'm using TypeScript for this, btw.

Looking at the differences between 4.0.0 and 4.0.10 it's not clear what changed, but something sure as crepes did, because trying to run the same import statement with 4.0.0 and 4.0.10 does not yield the same result. 4.0.0 worked, but updating to 4.0.10 yields error.

To Reproduce Follow the docs for basic usage:

yarn add [email protected]

Editor: image

Works fine.


Now change to 4.0.10

yarn add [email protected]

Editor: image

Expected behavior I expect the module to be found, dammit!

You should fix this!

Coreusa avatar Jan 24 '22 11:01 Coreusa

After a long debug hunt, seems this is need to fix the issue when using Marked with Typescript: yarn add @types/marked

You must add this info to the docs!

Coreusa avatar Jan 24 '22 11:01 Coreusa

The same issue is with me its not able to find the module at first but when It suggests installing @types/marked when I installed it, It is getting the module from @types/marked not marked Before installing @types/markded image Afer installing @types/markded image

*Note : I have already installed "marked": "^4.0.10"

ghulamyazdani avatar Jan 26 '22 12:01 ghulamyazdani

The failure looks like it occurred between versions 4.0.0 and 4.0.1, which should make it a bit easier to locate. It builds fine when only 4.0.0 is installed, but as soon as 4.0.1 or higher is installed you must also install @types/marked as mentioned above.

cwillwer avatar Feb 10 '22 05:02 cwillwer