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

Could not find a declaration file for module '@rainbow-me/animated-charts'. #77

Open
taatiq882 opened this issue Apr 11, 2022 · 4 comments

Comments

@taatiq882
Copy link

Could not find a declaration file for module '@rainbow-me/animated-charts'. '/Users/talhaatiq/Documents/GitHub/mustaqbil-reactnative/node_modules/@rainbow-me/animated-charts/src/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/rainbow-me__animated-charts if it exists or add a new declaration (.d.ts) file containing `declare module '@rainbow-me/animated-charts';

simulator_screenshot_E18F279E-DE6F-45EF-8C48-CF846FD5A984
`

@canpoyrazoglu
Copy link

There are no TypeScript typings for this library, but the actual error is something else. Without the actual code that you are using for the library it's very hard to pinpoint.

@sionkim00
Copy link

I'm having a same issue. Followed exactly what's being done on https://github.com/rainbow-me/react-native-animated-charts.

@taatiq882
Copy link
Author

I couldn't resolve this error so I switched to react-native-wagmi-charts.
Hope it does what you need.

@mscmnc
Copy link

mscmnc commented May 6, 2022

Could not find a declaration file for module '@rainbow-me/animated-charts'. '/Users/talhaatiq/Documents/GitHub/mustaqbil-reactnative/node_modules/@rainbow-me/animated-charts/src/index.js' implicitly has an 'any' type. Try npm i --save-dev @types/rainbow-me__animated-charts if it exists or add a new declaration (.d.ts) file containing `declare module '@rainbow-me/animated-charts';

simulator_screenshot_E18F279E-DE6F-45EF-8C48-CF846FD5A984 `

I had this error too.
The APP should run with that error too, it only points out that's can't find types. And it will not find because there is no such library with typescript at the moment.
But if you wanna get rid of the error. Just create a folder with the name "types" then create a subfolder like "@rainbow-me-animated-charts" and add the index.d.tsx file.
Inside index.d.tsx declare module:

declare module "@rainbow-me/animated-charts";

My React Native (Expo) with TypeScript version is 0.64.3.

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

4 participants