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

Can't run SmilesDrawer in React Native #183

Open
Omer1Yuval1 opened this issue Feb 21, 2024 · 1 comment
Open

Can't run SmilesDrawer in React Native #183

Omer1Yuval1 opened this issue Feb 21, 2024 · 1 comment

Comments

@Omer1Yuval1
Copy link

I have a React app ("react": "^18.2.0") and I would really like to use this great library. However I found that installing and running it in React is far from easy. I tried installing the latest version of SmilesDrawer (2.1.7) using npm install smiles-drawer, but this resulted in dependency errors related to "react-scripts" and "typescript". I then used npm install smiles-drawer --force which installed version 2.1.7 with warnings.

When I then try to import it into a new .js file (import SmilesDrawer from "smiles-drawer";) I get the following message:
'SmilesDrawer' is declared but its value is never read.ts(6133)
Could not find a declaration file for module 'smiles-drawer'. '/smiles-drawer/app.js' implicitly has an 'any' type.
Try npm i --save-dev @types/smiles-drawer if it exists or add a new declaration (.d.ts) file containing declare module 'smiles-drawer';ts(7016)

It would be great if someone could post a working minimal example along with the dependencies. Although I suspect the solution requires modifications to the library itself.

@duerrsimon duerrsimon mentioned this issue Apr 27, 2024
Closed
@silyu26
Copy link

silyu26 commented May 7, 2024

Hi did you solve that issue? I'm running into the same problem...

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

2 participants