A module cannot have multiple default exports

MARCKON LIU picture MARCKON LIU · Jul 13, 2019 · Viewed 7.6k times · Source

I have only one export default line in my code. However, in WebStorm with Typescript, I get this TS Error:

Ts2528: a module cannot have multiple default exports

Here is the code:

ts import { ModelCreator } from 'entities/model-creator' export default ModelCreator()

Answer

Obiwahn picture Obiwahn · Aug 30, 2019

I had the same error. After restarting WebStorm it worked again.