-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
No default export found in module import/default #178
Comments
Hi @nypinstripes can't believe I haven't seen this before but while I fix the module not having a default export, you should be able to do |
What JS bundler are you using? |
@dominictobias webpack 4.10.2 , wild card import with the alias seems to give a parsing unexpected token error. |
@dominictobias sorry that's if i use the braces, without the braces i get a no exported names found in module. |
If you console.log ReactCrop what does the browser say? There are definitely things exported from that module! |
@dominictobias i get the RC object, maybe a linter settings issue? |
I'm quite surprised about seeing most of those there as I'm only exporting a few of them but shouldn't do harm. I can also see |
Ok so it's working, was wondering why more people weren't complaining 😅Seems there is something up with your eslint config. Try removing it from the project, updating eslint globally, and running |
@dominictobias that might work, but unfortunately i have to keep it in my project, for the time being im fine with just having eslint ignore the line, and continue on my way.. thanks again |
No prob |
To fix by supressing this error message, the following code should work. But, there must be other better ways to solve this.
|
Hello all, |
This is due to this module exporting using ES5 Nothing is breaking but the only way to fix this is to export the module using ES6 PS as that thread says you can ignore imports using regex in eslint settings so it won't error when importing this module without the need for an eslint comment in the code. |
Fixed in v6.0.0 |
Note: import with |
@dominictobias If I am not mistaken, in TypeScript I have to use like this: Any plan to fix type definitions? |
Thank you for your answer and support |
Hey @dominictobias this lib looks great & really want to use it, but when i try to import it into my components i'm getting this error
error No default export found in module import/default
any advice would be appreciated thanks.
The text was updated successfully, but these errors were encountered: