Answers for "TS2732: Cannot find module '../../assets/animations/WelcomeScreen_Healthy_or_Junk_food.json'. Consider using '--resolveJsonModule' to import module with '.json' extensio"

5

Cannot find module './data.json'. Consider using '--resolveJsonModule' to import module with '.json' extension

add to tsconfig.json

{
	...
    "resolveJsonModule": true
  }
}
Posted by: Guest on July-30-2020
0

--resolveJsonModule

declare module "*.json" {
  const value: any;
  export default value;
}
Posted by: Guest on November-21-2020

Code answers related to "TS2732: Cannot find module '../../assets/animations/WelcomeScreen_Healthy_or_Junk_food.json'. Consider using '--resolveJsonModule' to import module with '.json' extensio"

Code answers related to "Javascript"

Browse Popular Code Answers by Language