Skip to content
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

Fix error with React Native's Packager #58

Merged
merged 1 commit into from
Apr 11, 2017

Conversation

jeanregisser
Copy link
Contributor

@jeanregisser jeanregisser commented Apr 3, 2017

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.

@ryanashcraft
Copy link
Contributor

Hi @jeanregisser. We currently have an .npmignore. Can we just add .babelrc to that?

@jeanregisser
Copy link
Contributor Author

@ryanashcraft yep that would work as well if you prefer. I'm updating the PR.

@jeanregisser jeanregisser force-pushed the only-ship-needed-files branch from c8c9b18 to 955699f Compare April 5, 2017 07:37
@jeanregisser jeanregisser changed the title Only ship needed files Fix error with React Native's Packager Apr 5, 2017
@ryanashcraft ryanashcraft merged commit fdebc68 into amplitude:master Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants