错误TS1192:模块'"模块“"没有默认导出 [英] error TS1192: Module '" A.module"' has no default export
本文介绍了错误TS1192:模块'"模块“"没有默认导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个新模块'A',并尝试将其导入另一个名为'B'的模块中.我在编译时显示此错误
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
错误TS1192:模块'"模块"没有默认导出
error TS1192: Module '" A.module"' has no default export
任何人都可以帮助解决该错误.
Can anyone please help on how to solve this error.
推荐答案
这是一个简单的错误.发生这种情况的原因是import语句本身中模块名称周围缺少{}.由于这浪费了我2-3个小时的时间,请与大家共享,这样您就不会浪费您的时间.希望这可以帮助某人.干杯,阿比.
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.
这篇关于错误TS1192:模块'"模块“"没有默认导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文