Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS: cannot find module error #108

Open
marcasmed opened this issue Nov 10, 2022 · 0 comments
Open

TS: cannot find module error #108

marcasmed opened this issue Nov 10, 2022 · 0 comments

Comments

@marcasmed
Copy link

marcasmed commented Nov 10, 2022

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 marcasmed changed the title Import statement needs updating TS: cannot find module error Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant