react-native-animated-charts icon indicating copy to clipboard operation
react-native-animated-charts copied to clipboard

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

Open taatiq882 opened this issue 3 years ago • 4 comments

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 `

taatiq882 avatar Apr 11 '22 17:04 taatiq882

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.

canpoyrazoglu avatar Apr 13 '22 12:04 canpoyrazoglu

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

sionkim00 avatar Apr 17 '22 04:04 sionkim00

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

taatiq882 avatar Apr 17 '22 07:04 taatiq882

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.

mscmnc avatar May 06 '22 19:05 mscmnc