TS2528

error TS2528: A module cannot have multiple default exports.

Broken Code ❌

1
2
3
4
5
6
7
const MyPerson = 'Benny';

export default MyPerson;

export default function MyPerson() {

}

Fixed Code ✔️

Make sure to only have one default export:

1
2
3
const MyPerson = 'Benny';

export default MyPerson;