react-cytoscapejs
react-cytoscapejs copied to clipboard
TS: cannot find module error
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