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

Fails to run with react-native project using babel 7 #627

Closed
xzilja opened this issue Jul 7, 2018 · 7 comments
Closed

Fails to run with react-native project using babel 7 #627

xzilja opened this issue Jul 7, 2018 · 7 comments

Comments

@xzilja
Copy link
Member

xzilja commented Jul 7, 2018

I just got following error when I ran danger (this doesn't happen when I run commands like lint, jest or flow, so led me to think this is something danger specific?)

Error:  Error: Plugin 0 specified in "/bitrise/src/node_modules/babel-preset-react-native/index.js" provided an invalid property of "default" (While processing preset: "/bitrise/src/node_modules/babel-preset-react-native/index.js")
    at Plugin.init (/bitrise/src/node_modules/babel-core/lib/transformation/plugin.js:131:13)
    at Function.normalisePlugin (/bitrise/src/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12)
    at /bitrise/src/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (/bitrise/src/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
    at OptionManager.mergeOptions (/bitrise/src/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
    at /bitrise/src/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
    at /bitrise/src/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (/bitrise/src/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)

Issue started appearing when I upgraded my react-native project to v0.56.0, with this an update to babel v7 happened as well as I now need to use latest version of babel-preset-react-native which I believe is referenced in the error.

Besides danger my project and other tooling that remotely relies on babel seem to be working fine.

@tjb295
Copy link

tjb295 commented Jul 18, 2018

I am having the exact same problem since upgrading to 0.56.0. Cannot run a single new project.

@fbartho
Copy link
Member

fbartho commented Jul 18, 2018

@iljadaderko @tjb295 -- The current babel-preset-react-native & babel7 changes cause TypeScript projects to explode (in my experience; we had to downgrade from 0.56.0 back to 0.55 when we exploded on several ways from Sunday).

The deal is that react-native now ships flow-types in-project (instead of stripping them), and babel7's basic structure explodes if both flow & typescript transformers are loaded at the same time.

@sebinsua
Copy link
Contributor

@xzilja
Copy link
Member Author

xzilja commented Jul 21, 2018

@sebinsua whats the status there? I assume babel needs to be removed, but this can't be done due to tests?

@cwright017
Copy link
Contributor

This is an issue because dangerjs is still using babel-7 alpha and the consuming project is using babel7 stable.

@orta
Copy link
Member

orta commented Sep 11, 2018

Danger's deps only include babel-polyfill - do you have a sense about why it would be affecting a babel7 build?

@orta
Copy link
Member

orta commented Sep 21, 2018

We're working with babel 7 - so this should be fixed

@orta orta closed this as completed Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants