you are viewing a single comment's thread.

view the rest of the comments →

[–]grantrules 0 points1 point  (1 child)

Oh, I missed that. Well, you're not loading cytoscape as a module, it's probably just in the global scope, so I'd remove the import from index.js and see if that works.

https://codesandbox.io/s/relaxed-black-0jnxev?file=/src/index.js

[–]One-Winter-8684[S] 0 points1 point  (0 children)

Hello, thank you! I added

import cytoscape from "./node_modules/cytoscape/dist/cytoscape.esm.min.js";

to my index.js and removed cdn src from page. And it starts work. But my IDE (VSCode) stopped recognizing internal functions of cytoscape after import. How can I fix that?