-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Packager hangs indefinitely on require('redux') in v0.16.0 #4674
Comments
Hey anshul, thanks for reporting this issue! React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
|
I have error with redux when i try make a bundle: |
Redux and React Native 0.16 are incompatible until Babel 6's babelrc resolver matches Babel 5's. |
I believe this is the issue. Any patch to this for the moment? Or we have to wait for the next version release of react-native before we can use external packages? |
I think you can use custom transformer with babel 5 (--transformer option for packager and react-native bundle). |
I was having this problem. Then I found this issue and upon opening my computer I found that the last thing i was looking at was this: https://github.com/alinz/example-react-native-redux/blob/master/Counter/package.json I looked at @alinz package json and I notice he removes the .babelrc from all his node modules folder. I am not really even sure how this works but for some reason, despite not having any other babelrc file, it does. I am able to import redux fine after running that command. I don't think this a permanent solution but it does work. |
@pr1ntr as @ide mentioned this is babel6 issue which it's incompatible with babel 5 rc files. The real problem is redux included babelrc into repo. Redux's baberc is incompatibale with babel6. So they need to either fixes their babelrc or remove it. @jaysoo found that removing all babelrc files in all node_modules except the ones in packager will fixes the issue of redux for short time. |
Just released |
I also released |
@christopherdro @anshul @pr1ntr Can confirm that this fixes it for redux. Might be other node modules that have same problem, but bug should be filed on their repo. |
Closing this for now. Let's reopen if issue persists. |
@gaearon This is still happening I think redux-thunk itself still uses {
message: "TransformError: Counter/node_modules/redux-thunk/lib/index.js: [BABEL] Counter/node_modules/redux-thunk/lib/index.js: Unknown option:Counter/node_modules/redux-thunk/.babelrc.stage",
type: "TransformError",
errors: [{ }]
} The workaround for now is to use the following bash script to get rid of all cd node_modules; find . -name .babelrc | grep -v packager | xargs rm @satya164 this issue needs to be reopened. I think all side modules of redux need to be updated. |
The current solution of having every package maintainer (who uses Babel) need to remember to exclude .babelrc is not scalable. We need an option in Babel to say: ignore only the .babelrc files under node_modules. |
@ide agree with your proposal but Babel6 has introduces a lot of api changes. I think this solution would be good for short time. I believe 3rd party modules need to be updated to be compatible with Babel6 or we end up with a lot of messy compatibility code and hacks. Do you think putting |
@satya164 thanks! |
Fixes issues with redux-actions in react-native. See [https://github.com/facebook/react-native/issues/4674](here) for more.
[6:57:52 PM] <START> transform transforming [======================================= ] 97% 383/395
and it stays hung there for hours...
The text was updated successfully, but these errors were encountered: