mermaid: Property 'initialize' does not exist after upgrading to v9.2.2
Description
I’m using mermaid with dynamic import:
let { initialize, render } = (await import('mermaid')).default
After updating to version 9.2.2 I get the following errors:
Property 'initialize' does not exist on type 'typeof import("/Users/user/Developer/azat-io/node_modules/.pnpm/mermaid@9.2.2/node_modules/mermaid/dist/mermaid")'.
32 let { initialize, render } = (await import('mermaid')).default
Property 'render' does not exist on type 'typeof import("/Users/user/Developer/azat-io/node_modules/.pnpm/mermaid@9.2.2/node_modules/mermaid/dist/mermaid")'.
32 let { initialize, render } = (await import('mermaid')).default
In version 9.2.1 everything works fine
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (11 by maintainers)
Commits related to this issue
- Fix #3799: Remove `type` from package.json — committed to mermaid-js/mermaid by sidharthv96 2 years ago
- Merge pull request #3802 from mermaid-js/release/9.2.3 Fix #3799: Remove `type` from package.json — committed to mermaid-js/mermaid by pbrolin47 2 years ago
- Merge branch 'master' into sidv/jsdelivr * master: doc: Add mindmap integration docs fix: Fetch depth fix: Fetch depth fix: Fetch depth fix: Add commit count to release preview fix: Add co... — committed to mermaid-js/mermaid by sidharthv96 2 years ago
- Merge branch 'master' into develop * master: doc: Add mindmap integration docs fix: Fetch depth fix: Fetch depth fix: Fetch depth fix: Add commit count to release preview fix: Add commit c... — committed to mermaid-js/mermaid by sidharthv96 2 years ago
@aloisklink @knsv, changing
"type": "module",
in our package.json also fixes the problem.Also, I was checking
tslib
, another dependency ofdocusaurus
and they don’t have atype
in their package.json. When I removed it from ours, EVERYTHING works.So, why don’t we just remove that from package.json (in mermaid)?