Typescript can't find dompurify type definition file when the package manager used is yarn #6078
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Description
When I install my nextra project's dependencies and run
tsc
to check for any type errors, I get the ff error message from typescript:I found out that this is caused by a conflict between mermaid's dompurify and @types/dompurify dependencies. What's happening is mermaid's @types/dompurify dependency at version ^3.0.5 resolves to version 3.2.0, which then depends on dompurify version 3.2.1. Somehow, this causes the aforementioned typescript error.
To clear things up, my project doesn't directly depend on dompurify but @theguild/remark-mermaid does which, in turn, is dependend upon by nextra.
Steps to reproduce
yarn install
. You should see a warning from dompurify as below:yarn type:check
. You should see the error mentioned in the Description and shown on the screenshot attached under Screenshots.Screenshots
Code Sample
No response
Setup
Suggested Solutions
@types/dompurify
to3.0
.Additional Context
No response
The text was updated successfully, but these errors were encountered: