Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

angular

I'm facing these issues in angular 12 version, I'm unable to connect the JSON file

like image 803
SADANAND KUMAR -1SV17CS037 Avatar asked Jan 20 '26 19:01

SADANAND KUMAR -1SV17CS037


1 Answers

Place the below setting into compilerOptions of tsconfig.json. See the example here

"resolveJsonModule": true,
"esModuleInterop": true,
like image 69
Zam Abdul Vahid Avatar answered Jan 22 '26 12:01

Zam Abdul Vahid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!