-
Notifications
You must be signed in to change notification settings - Fork 2.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
Upgrade to Babel 7 React Native 0.56 -- Breaking Change #2028
Comments
@dharmilsan Did you try to run RN app with RN 0.56.0 or 0.56.0-rc.2? |
@SupriyaKalghatgi Honestly speaking, I was trying to get this running using react-native-web and Next.js which uses Babel 7 by default. That being said, I can probably try checking if I can build v0.56 today |
@SupriyaKalghatgi about #2035, So that should be taken into account here too! It was removed here facebook/react-native@a8e3c7f |
Any patch for RN 0.56.0?
|
rn 56 removed everything, just spent the entire day replacing all my IF anyone reading this wants a temporary solution until nativebase moves to babel7 you can use my rn fork of 56rc4 --> https://github.com/stokesbga/react-native Sorry I can't help with a real PR - Love what you guys are doing! |
Getting the same error:
Is there a plan to fix this? |
hey! getting the same error as @fhadsheikh after upgrading to RN 0.56.0 adding the file manually seems to fix the issue |
Anyone on Nativebase team seeing this? Can you acknowledge? |
Im glad people are getting blocked if they're too stupid to read. Nativebase team is very aware of the issue, considering they have referenced several hundred threads in the react-native repo. Until they upgrade to babel 7 and make changes to support the removed props shim, you can use my 56rc4 fork that has the file added back https://github.com/stokesbga/react-native |
@stokesbga Too stupid to read what? We saw your fork and thanks for taking the time to do it. I think on our end we would prefer to not adjust react native to make native-base work so we were hoping, as the first post asks, we could see if there is a migration plan for it. |
@stokesbga here is a search of this repo's issues relating to 56. https://github.com/GeekyAnts/NativeBase/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+56 As you can see this is the only thread. I think its more than appropriate to comment right here. |
The answer to your question is yes. There is a plan for native-base support RN56. If you insist of moving to latest RN version, you have to be patient with third party libs. |
Yeah we have not moved yet. We just started testing 56 and so far this is the only stopper. This issue has been open for a few weeks now with no specific reply so I think people here are just trying to drum up some attention from the team. If they are on it then a simple comment would be all thats required. |
The contents of said file ReactNativePropRegistry.js is interesting: /**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule ReactNativePropRegistry
* @flow
*/
'use strict';
const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');
module.exports =
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactNativePropRegistry; I don't believe any third party library should be dependent on this. It's been an issue with native-base for a while, unfortunately. |
We are aware of this, and will fix soon |
This issue is opened quite days ago, but we cannot start making changes to our package depending on |
Completely understand that. I was just questioning the dependency of a third party library like native-base on an internal API. |
I have a project which is due 4 business days from now and I heavily rely on native base. Someone please help? :( Please tell me what RN version is going to work with the latest native base release? Thanks! |
@redefinered React Native after a gap of 2 months released 0.56 couple of days back. Hope you understand why they took this long to rollout 0.56, same applies to 3rd party libraries I dont think its so very important to move to 0.56 immediately after its release. So RN 0.55.4 and latest NativeBase will work in this case |
Fixed with 2.7.0 |
Keeping this issue open over this weekend |
Upgraded NativeBase KitchenSink |
@SupriyaKalghatgi, thanks! Very prompt! Is this still backwards compatible with react-native < 0.56.0? Some of other libraries that I use have issues as well so I need to wait 😄 |
@ujwal-setlur This is mentioned in release notes |
I tried these
worked fine @ujwal-setlur |
Thanks! |
Thanks you so much @SupriyaKalghatgi! I think everyone here appreciates the work to get this updated! |
Thank you guys. Not the useless morons, but the native-base team |
@stokesbga for posterity |
@SupriyaKalghatgi I tried
I get this error: |
@redefinered Have you upgraded your Try upgrade it in your "babel-preset-react-native": "^5.0.2", |
@redefinered The screenshot says error is due to babel-preset-react-native, then you must share this too along with NativeBase, React and React Native versions |
Closing this today |
I can confirm that the issue is gone and everything is working. Thanks! :)
|
@redefinered were you able to solve the issue? |
Whereas the application is running nobody is getting errors when trying to run a jest test that uses native-base? for my case I check the issues:
Besides, there is a great comment at: facebook/react-native#19859 (comment) While it solves my issue to run jest it doesn't allow me to solve the issue to run the tests once I add native-base to my project. My An overview to the error:
Looks pretty much as there is something wrong when the code is being read for jest (or something like that). In any case, thanks for the work at native-base, if someone face the same issue or knows the solution please comment below. Cheers! 🍻 |
Basically, I use the same approach as #396 (comment) and now it works as expected. |
Fixed with last effort of adding the file manually seems to fix the issue |
Module |
I've spent several days fighting dependencies, and now find that my fresh install can't handle my app's code because the development platform broke itself? Ick. |
Hey, is there a link in here to where all the similar breaking items are listed? I need to know what else has been broken in the past year. |
I am also facing the same issue with the following configuration:
.babelrc:
The error trace:
|
I have following all the steps in this issue but I still have it the error.
I'm on my way to upgrade my app 0.55.4 to 0.56.1 and I would love to compile it before I increase my RN version again Anyone can help? @melkishengue @SupriyaKalghatgi |
RN v0.56 is going to introduce a breaking change in terms of upgrading to babel7. babel7 is NOT backwards-compatible with babel6 and hence all the plugins will need to be manually updated to import the new babel scoped packages. Read more here: https://github.com/react-native-community/react-native-releases/blob/master/CHANGELOG.md#056 and https://babeljs.io/docs/en/next/v7-migration
Given that native-base's dependencies use babel 6 (native-base-shoutem-theme, react-native-vector-icons amongst the ones I've checked), what is the migration plan? I've tried monkey patching both the packages manually but ES6 imports still fail with my config.
The text was updated successfully, but these errors were encountered: