The requested module does not provide an export named 'default'
I'm trying to export the following interface:
And the import:
But when running it says The requested module '../domain/repository/AuthRepository.ts' does not provide an export named 'default'
But i already did export other interfaces and imported them, and it worked. I don't know what am i doing wrong, any clue?
1 Reply
Based on the documentation, it seems like there might be a typo in your interface definition. You've written
signUp(uer: User): Promise<void>;
instead of signUp(user: User): Promise<void>;
.
Here's the corrected code:
And the import should remain the same:
If you've already corrected the typo and you're still encountering the issue, it might be worth checking the path to make sure it's correct and that the file is being found. If the path is incorrect, it could lead to the error message you're seeing.
If none of these solutions work, there might be an issue outside of the provided code snippet. In that case, I would recommend checking the rest of your code for potential issues.