Error TS7016

Hi, I was trying to import SketchPicker from react-color, however yarn throws a error saying it does not recognize react-color, this is more of a typescript error (TS7016) which does not allow packages due to type conversion issue.

The fix suggested asks me to create .d.ts file with content (declare module react-color), and make required changes in tsconfig.json (application level)

Long story short, I could not find tsconfig.json in theia (application level), is there any alternative solution for this.

Many thanks in advance.

Hey @Nandish,

your tsconfig.json file should be somewhere in your Theia application (see also Theia Blueprint).

However, in the case of react-color I would recommend you to just install @types/react-color into your dev-dependencies. You don’t need to type the declaration yourself.

Hi @msujew thanks for the response, it did not function with @types/react-color, but I could somehow fix it with //ts-ignore. However it worked with my colleague, react library.