question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'initialize' does not exist after upgrading to v9.2.2

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sidharthv96commented, Nov 15, 2022

@aloisklink @knsv, changing "type": "module", in our package.json also fixes the problem.

Also, I was checking tslib, another dependency of docusaurus and they don’t have a type in their package.json. When I removed it from ours, EVERYTHING works.

// Webpack
const mermaid = require('mermaid');
import mermaid from 'mermaid';

// Vanilla
import mermaid from "mermaid";
let { initialize, render } = (await import("mermaid")).default;

So, why don’t we just remove that from package.json (in mermaid)?

0reactions
azat-iocommented, Dec 15, 2022

I updated mermaid to v9.3.0 and issue was not fixed: https://github.com/azat-io/mermaid-ts-errors-9.2.2

Can you reopen the issue again?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to create migrations after upgrading to ASP.NET Core ...
This solution introduces a dependency on Entity Framework into your host application (in my case this is a Web project). Is there any...
Read more >
Fix list for IBM WebSphere Application Server traditional V9
IBM WebSphere Application Server traditional provides periodic fixes for the base and Network Deployment editions of release V9. The following is a complete ......
Read more >
Common errors and how to fix them - Mobiscroll Help Center
Solution: Download resources again and update your local package. Make sure to check all the components you need in the 1. Choose Components...
Read more >
Migration Guide: SQL, Datasets and DataFrame - Apache Spark
Upgrading from Spark SQL 3.2 to 3.3; Upgrading from Spark SQL 3.1 to 3.2 ... Since Spark 3.3, DESCRIBE FUNCTION fails if the...
Read more >
TypeScript: JavaScript With Syntax For Types.
TypeScript is a strongly typed programming language that builds on JavaScript, ... Property 'name' does not exist on type '{ firstName: string; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found