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 issue undefined is not an object evaluating r.default #4699

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

ebaynaud
Copy link

Fix aksonov/react-native-router-flux#3124

Please provide enough information so that others can review your pull request:

Motivation

Release builds fails without these changes

Test plan

No more errors

Code formatting

Simple letter put from uppercase to lowercase

Changelog

Not required I guess

@react-navigation-ci
Copy link

@ericvicenti
Copy link
Contributor

I'm confused why this would fix anything.. what bundler are you using?

@ebaynaud
Copy link
Author

Standard metro bundler... I do not know what really happens as you can see in aksonov/react-native-router-flux#3124 but what I'm sure of is that it fixes the encountered issue for me and other people!

@brentvatne
Copy link
Member

thanks for submitting a pr! although this seems to fix your problem, i'm hesitant to land something that works without any reason that anyone can understand. it seems more like a bug in another tool.

@ebaynaud
Copy link
Author

I understand @brentvatne but it's a really minor change that could avoid me and others folks still using react-native-router-flux to fork react-navigation. That's the only workaround found yet...

@brentvatne
Copy link
Member

sorry unless someone can explain why this fixes the problem we cannot land it. the diff on its own makes no sense

@brentvatne brentvatne closed this Jul 19, 2018
@TwilightOwl
Copy link

@brentvatne https://babeljs.io/docs/en/babel-plugin-transform-class-constructor-call
This babel plugin is removed from babel 7, therefore your module doesn't work in React Native 0.56 in some cases. Now creating instance without 'new' keyword is impossible. So use 'tabRouter' instead 'TabRouter' or use new with 'TabRouter'

@ebaynaud
Copy link
Author

We have now our root cause, could we merge? :)

@martincarrera
Copy link

Please @brentvatne could you reopen this PR? Thanks.

@brentvatne brentvatne reopened this Jul 26, 2018
@brentvatne
Copy link
Member

thanks! yes

steelbrain pushed a commit to Truebill/react-navigation that referenced this pull request Aug 1, 2018
@rishiankush
Copy link

I updated my react-navigation package with this above fix in all the files:
src/navigators/DrawerNavigator.js
src/navigators/StackNavigator.js
src/navigators/TabNavigator.js

but still getting the same issue in release mode:
Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'r.default')

@brentvatne
Copy link
Member

cc @ebaynaud

@jinwuu
Copy link

jinwuu commented Aug 31, 2018

I solved the same issue by: facebook/react-native#20150, Workaround 2

@abartolo
Copy link

abartolo commented Sep 4, 2018

@ebaynaud Thanks for the fix. I am now able to compile release build successfully.

@rishiankush Did you update all files? I see 4 files are changed but you only mentioned 3.

cc: @brentvatne

steelbrain pushed a commit to Truebill/react-navigation that referenced this pull request Sep 19, 2018
@brentvatne
Copy link
Member

if someone can confirm that this works as expected i can land it and publish an update to 1.x

@abartolo
Copy link

@brentvatne I can confirm this is working. I have been building release builds for IOS and Android using the following "git+https://github.com/ebaynaud/react-navigation#1.x" in my package.json for about 3 weeks now.

@brentvatne brentvatne merged commit 103f448 into react-navigation:1.x Sep 24, 2018
@luco
Copy link

luco commented Oct 2, 2018

I'm getting this on v2 as well.

@brentvatne
Copy link
Member

please create a new issue and follow the template @luco

@react-navigation react-navigation locked and limited conversation to collaborators Oct 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants