-
-
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
Incorrect "No default export found" #850
Comments
How are you importing it? Since that module.exports is an object, the implication is that you should be named-importing it's properties as you need then. |
import codePush from "react-native-code-push"; ... so with a default import which is working well. |
If you try |
The same also happens with How can I help debug and fix this? |
hmm, that one is just a function, so that should work fine. @Sparragus any chance you could make a small repo that reproduces the problem? |
@ljharb Sure. Will reply with it later. |
@ljharb Here you go: https://github.com/Sparragus/eslint-plugin-import-bug I also added another case. It's having trouble with https://github.com/react-native-training/react-native-elements/blob/master/src/index.js too. I added a README with instructions on how to reproduce. Let me know if it worked. |
Eesh, both of those are publishing untranspiled code. Either way, I'm not sure why However, I'm super confused why either of those packages publish untranspiled |
@ljharb linter still complains with |
since the imported module is a valid ES module (has the linter is correct: there is no default export. is this sort of module typical? I am unfamiliar with this usage of CJS export with ESM import. you can |
Hello,
I get an incorrect "No default export found" error when importing "react-native-code-push".
Source code of this module is here : https://github.com/Microsoft/react-native-code-push/blob/master/CodePush.js
It would be great if you could fix this.
Thanks in advance.
The text was updated successfully, but these errors were encountered: