react-cytoscapejs icon indicating copy to clipboard operation
react-cytoscapejs copied to clipboard

TS: cannot find module error

Open marcasmed opened this issue 2 years ago • 0 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

marcasmed avatar Nov 10 '22 11:11 marcasmed