Cannot find module ‘file-name.png’ or its corresponding type declarations – typescript react

There should be a react-app-env.d.ts file in your src folder.
If you don’t see it, Create a new file in src folder named react-app-env.d.ts.

Now, just add the code below in your react-app-env.d.ts file.

declare module "*.png";
declare module "*.svg";
declare module "*.jpeg";
declare module "*.jpg";

and you are good to go 🙂

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)