Fix error with React Native's Packager #58
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there
I'm using React Native (0.43.0-rc.3) and initially got the error message reported in #32 when I tried to use redux-query with it.
The reason why it happens is React Native's packager tries to transpile packages in node_modules and if one of the package has a
.babelrc
config, it tries to use it.Here since I don't have the presets used by redux-query (
"react", "es2015", "stage-2"
) in my main project dependencies, it fails.One fix is not to ship the
.babelrc
file as part of the npm package so it doesn't confuse RN's packager.Note that in the future RN will stop transpiling node_modules so this won't be a problem anymore.
See facebook/react-native#10966
Let me know what you think.