-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
SyntaxError: import not found, and no hint as to which file this happens in. #186
Comments
Random thought: is Mocha perhaps swallowing the stack by throwing a new error with its own stack? |
The limited error message is due to es-module-shims providing a limited message. I tested in shim mode, and I see this:
This is not specifying the importer or the importee, making debugging difficult. |
Hmmm, maybe it is not esms's fault? I'm not sure. I was running in Firefox, but the error is better in Chrome:
That's still difficult though. Is esms making that blob? |
After turning off es-module-shims in Chrome, I was able to discover the source name of the module that didn't have a |
We include source maps, so Chrome has the information to provide a better error. It's actually a browser issue that these errors are so bad - there is nothing this project can do about it! |
Aah, and I had source maps turned off. Thanks. |
I'm getting an error like this, and we can see that it isn't helping because it provides no indication as to which file is trying to do the import, or which file doesn't have the default export.
This is very hard to debug. Can the error
message
be improved so that it also shows the importer and/or importee file names?EDIT: Oh, wait, I think that's what
blob:http://localhost:9876/9f08970d-6ed9-4d23-891b-37232270b698
is supposed to be, and I'm not sure where that's coming from. I'll close this, because it seems that the information is there and nothing to do with the polyfill.The text was updated successfully, but these errors were encountered: