-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: No default export found in module
is unclear
#751
Comments
But did you have a default export specified? |
I think I just ran into this.
The second one was wrong and I got the same error message. A third file that imported the erroneous file also complained about exports too. That may or may not have been related to my switching the import style in that file and changing the erroneous file export style to fix the confusing message. Seeing this issue defiinitely helped me find my own issue right away. The message could be clearer about the line and failing import name which has no default (Moo in this case was being imported incorrectly, but it seemed like it was Goo that had the issue) Something like |
I recently encountered an an issue in my code where I was getting this error:
No default export found in module
. This message to me indicated that I was missing aexport default
within the file I was modifying. However, it instead was related to an import I had. I think this message should be a bit more clear in specifying that an import is incorrect.Bad Version:
import blah from 'blah'
Fixed Version:
import * as blah from 'blah'
Sorry if this is duplicated or described badly, but it was super super confusing.
The text was updated successfully, but these errors were encountered: