error TS1192: Module '" A.module"' has no default export

Abhi picture Abhi · Nov 4, 2016 · Viewed 60.9k times · Source

I have created a new module 'A' and trying to import it in another module called 'B'. I am getting this error on compiling that says

error TS1192: Module '" A.module"' has no default export

Can anyone please help on how to solve this error.

Answer

Abhi picture Abhi · Nov 4, 2016

This was a simple error. It occurred due to the missing {} around the module name in the import statement itself. Since this killed 2-3 hours of my time, sharing with you all so you won't waste yours. Hope this can help someone. Cheers, Abhi.