-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
GLOBAL.Text error when upgrading to 0.16 #4862
Comments
Hey maraujop, 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.
|
Duplicate of #4811. |
FWIW I am seeing this issue on 0.17 as well. |
These polyfills seem to be transpiled as: (function(GLOBAL){
function getInvalidGlobalUseError(name){
return new Error(
'You are trying to render the global '+name+' variable as a '+
'React element. You probably forgot to require '+name+'.');}
GLOBAL.Text={
get defaultProps(){
throw getInvalidGlobalUseError('Text');}};
GLOBAL.Image={
get defaultProps(){
throw getInvalidGlobalUseError('Image');}};
if(GLOBAL.document){
GLOBAL.document.createElement=null;}
GLOBAL.MutationObserver=undefined;})(undefined); notice the |
Experiencing the same error locally. |
I started experiencing this cryptic error today, with literally zero code changes on my part. All I did was stop the iOS simulator, which was successfully running my project as "iPad Air 2", change the simulator to "iPhone 6s Plus", then try to run it again—something I had done a dozen times in the last few hours with no problems. Now I can't run any iOS simulator—they all give me this error. I tried the "extends" suggestion from #4811, but that didn't work. I then removed my |
I believe this command clears the cache (#1924) |
Hi,
After upgrading to RN 0.16 we had some nasty red boxes like this one, in iOS and Android.
Apparently there are more people having this issue and asking for help online. We didn't know how to fix it, so we created a new app and starting moving chunks of code trying to find the culprit. However, we ended up moving all the code without issues and everything was working and compiling. This looked like a cache bug, we continued working with this new project and after downloading the JS bundle for several times, we hit this red screen again.
Then we discovered that the
.babelrc
file we had in the root of our project was causing at least part of the issue. We renamed this file and then we launched the packager with--reset-cache
. All of a sudden everything was working again. is this an expected behavior? can this be a packager cache bug?Thanks, cheers
Miguel
The text was updated successfully, but these errors were encountered: