-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9.1.7 => 9.2: can't build with TypeScript - TS1471: Module 'mermaid' cannot be imported using this construct #3747
Comments
I'm not really 100% sure why this issue is occurring. From what I can see, the v9.2.0 Mermaid mermaid/packages/mermaid/package.json Lines 8 to 16 in e78ac9b
and
However, switching to After fixing that issue, there was also an incorrect type error in After that, docusaurus builds fine,
As far as I'm aware, everything was supposed to be backwards compatible, but clearly we could use better tests. |
Can you please test |
Thanks for your reactivity I can confirm 9.2.2 works fine now 👍 Not sure exactly what is happening either 😅 |
Describe the bug
Docusaurus introduced Mermaid support last week: https://docusaurus.io/blog/releases/2.2
On 9.1.7 it works fine, but on 9.2.0 it fails, and users installing our Mermaid plugin started to report failures: facebook/docusaurus#8274
To Reproduce
Steps to reproduce the behavior:
yarn workspace @docusaurus/theme-mermaid build
I'm able to make it compile by removing the exports
"types": "./dist/mermaid.d.ts"
And it seems to work at runtime as before, but I still get those Webpack console warnings:
Note: I did try to remove the DefinitivelyTyped bindings, and it doesn't improve anything.
Expected behavior
It works as before for library consumer apps OR the major version gets bumped for significant changes that might affect consumer apps. We rely on
^
so our users auto-upgrade to the latest 9.x.I'm not sure what exactly changed in this release but it looks like it's a quite significant one (monorepo, TS...), and was wondering if it wouldn't be safer to release all this in v9.x instead of v8.x.
The text was updated successfully, but these errors were encountered: