plotly / react-cytoscapejs

React component for Cytoscape.js network visualisations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TS: cannot find module error

marcasmed opened this issue · comments

To those developing with TS and receiving a "module not found" when importing "react-cytoscapejs" (depending on their configuration):

import CytoscapeComponent from 'react-cytoscapejs';  // produces "cannot find module error"

Fix the error by installing the types for React Cytoscape

npm i @types/react-cytoscapejs
import CytoscapeComponent from 'react-cytoscapejs';  // no longer produces error