react-ui-kit / dribbble2react

Transform Dribbble designs to React-Native code | Shop UI Kit >>
https://react-native-10x-faster.com
MIT License
2.56k stars 1.39k forks source link

Plant app bugs (undefined is not an object (evaluating 'theme.label')) #46

Closed Oguntoye closed 4 years ago

Oguntoye commented 5 years ago

TypeError: TypeError: undefined is not an object (evaluating 'theme.label')

hetmann commented 5 years ago

@Oguntoye thanks to point this out. I wasn't able to find the error or any reference to it. Could you describe the exact steps? or anything else that will help investigate this, screen & line number?

Oguntoye commented 5 years ago

Thanks for your response.

Steps

  1. Download the project zipped file
  2. npm install and that installs all the dependencies
  3. expo start --android
  4. Opened application on android emulator
  5. Welcome page displayed
  6. Press Login or Signup (Red screen error TypeError: TypeError: undefined is not an object (evaluating 'theme.label'))

On Thu, Aug 29, 2019, 8:00 AM Hetmann W. Iohan notifications@github.com wrote:

@Oguntoye https://github.com/Oguntoye thanks to point this out. I wasn't able to find the error or any reference to it. Could you describe the exact steps? or anything else that will help investigate this, screen & line number?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-ui-kit/dribbble2react/issues/46?email_source=notifications&email_token=AGEFLFAGHPNLVX7QRAEMCEDQG56Y5A5CNFSM4IR25LD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5NTY4I#issuecomment-526072945, or mute the thread https://github.com/notifications/unsubscribe-auth/AGEFLFDKYHL4GDQVQAC6DOTQG56Y5ANCNFSM4IR25LDQ .

naveedahmed986 commented 5 years ago

I faced the same issue. Steps:

  1. npm install
  2. npm start
  3. Opened application on iPhone 7 using Expo CLI
  4. Welcome screen is displayed
  5. Press Login or Signup (Red screen error TypeError: TypeError: undefined is not an object (evaluating 'theme.label'))
Oguntoye commented 5 years ago

I faced the same issue. Steps:

  1. npm install
  2. npm start
  3. Opened application on iPhone 7 using Expo CLI
  4. Welcome screen is displayed
  5. Press Login or Signup (Red screen error TypeError: TypeError: undefined is not an object (evaluating 'theme.label'))

Have you been able to resolve this?

hetmann commented 5 years ago

@Oguntoye @naveedahmed986 I followed the same steps without any errors. What setups do you have: npm, yarn, nodejs, react-native, etc?

Oguntoye commented 5 years ago

npm Node v 10.15.1 react-native-cli : 2.0.1

On Thu, Aug 29, 2019, 1:36 PM Hetmann W. Iohan notifications@github.com wrote:

@Oguntoye https://github.com/Oguntoye @naveedahmed986 https://github.com/naveedahmed986 I followed the same steps without any errors. What setups do you have: npm, yarn, nodejs, react-native, etc?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-ui-kit/dribbble2react/issues/46?email_source=notifications&email_token=AGEFLFEO2SYPKTOXAH74GSLQG7GFRA5CNFSM4IR25LD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5OP5OY#issuecomment-526188219, or mute the thread https://github.com/notifications/unsubscribe-auth/AGEFLFE5OSVESVVPI3MMGQDQG7GFRANCNFSM4IR25LDQ .

hetmann commented 5 years ago

@Oguntoye could you share a screenshot of the error on simulator?

Oguntoye commented 5 years ago

@hetmann Steps to reproduce:

  1. Download a compressed zip of https://github.com/react-ui-kit/dribbble2react/tree/master/plant-app
  2. npm install
  3. expo start --android

After expo start --android Screen Shot 2019-08-29 at 1 53 07 PM

When I press login or sign up Screen Shot 2019-08-29 at 1 53 24 PM

ahunain commented 5 years ago

@hetmann I also have the same problem

hetmann commented 5 years ago

@Oguntoye @ahunain @naveedahmed986

I think this is due to react-navigation, from the screenshot I understand this:

My suggestion is to edit the screens/Signup.js & screens/Login.js add the following:

static navigationOptions = {
    title: null
}

This will tell HeaderTitle not to render any title and maybe will ignore that theme.label error.

Oguntoye commented 5 years ago

@hetmann .. I added the above snippet but the error still persists

naveedahmed986 commented 5 years ago

I also added the snippet but error is still there

I tried to locate the file that it indicates where error is coming from node_modules\react-navigation-stack\lib\module\views\Header\HeaderTitle.js:20 and on line 20 :

style={[styles.title, { color: theme.label }, style]}

i tried changing it to color: '#3c4043' but still gives the same error.

@Oguntoye @ahunain @naveedahmed986

I think this is due to react-navigation, from the screenshot I understand this:

  • HeaderTitle is rendering the title (in our case nothing) from Header.tsx and is trying to get the theme.label value, but the theme is undefined.

My suggestion is to edit the screens/Signup.js & screens/Login.js add the following:

static navigationOptions = {
    title: null
}

This will tell HeaderTitle not to render any title and maybe will ignore that theme.label error.

hetmann commented 5 years ago

@naveedahmed986 @Oguntoye @ahunain What version of react-navigation && react-navigation-stack you're using?

You can find the version on package.json:

I followed the steps above (download and install) I have the following versions:

HeaderTitle.tsx is looking like this:

Screenshot 2019-08-30 at 14 41 56
jestintab commented 5 years ago

I am also having the same issue.

hetmann commented 5 years ago

@jestintab waiting for the response to my question:

jestintab commented 5 years ago

@hetmann react-navigation version is 3.6.1 and react-stack-navigation was 1.2.5 , I reinstalled to 1.2.0 still it doesn't work

hetmann commented 5 years ago

@Oguntoye @naveedahmed986 @ahunain @jestintab

priteshbaviskar commented 5 years ago

I use Mac and I ran into the same thing.

Oguntoye commented 5 years ago

I'm using MAC OSX High Sierra

On Fri, Sep 13, 2019, 5:28 PM priteshbaviskar notifications@github.com wrote:

I use Mac and I ran into the same thing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-ui-kit/dribbble2react/issues/46?email_source=notifications&email_token=AGEFLFGYTP6WJL43IESVTE3QJPEVXA5CNFSM4IR25LD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6VVZRY#issuecomment-531324103, or mute the thread https://github.com/notifications/unsubscribe-auth/AGEFLFHILURE6752TSML3EDQJPEVXANCNFSM4IR25LDQ .

hetmann commented 5 years ago

@Oguntoye @naveedahmed986 @ahunain @jestintab I think I found a solution for this problem, this is due to expo versions:

https://stackoverflow.com/questions/57768921/typeerror-typeerror-undefined-is-not-an-object-evaluating-theme-label-erro

priteshbaviskar commented 5 years ago

@Oguntoye @naveedahmed986 @ahunain @jestintab I think I found a solution for this problem, this is due to expo versions:

* Try to migrate from expo31 to expo33. Skip expo32.

https://stackoverflow.com/questions/57768921/typeerror-typeerror-undefined-is-not-an-object-evaluating-theme-label-erro

This worked! Much thanks :)

hetmann commented 5 years ago

@Oguntoye @naveedahmed986 @ahunain @jestintab I leave this issue open so other can see the solution.

Oguntoye commented 5 years ago

Thanks so much. I will check it our later

On Mon, Sep 16, 2019, 8:13 AM Hetmann W. Iohan notifications@github.com wrote:

@Oguntoye https://github.com/Oguntoye @naveedahmed986 https://github.com/naveedahmed986 @ahunain https://github.com/ahunain @jestintab https://github.com/jestintab I leave this issue open so other can see the solution.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-ui-kit/dribbble2react/issues/46?email_source=notifications&email_token=AGEFLFAXU6RID7X6CQ2WQSDQJ452NA5CNFSM4IR25LD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6YM3WQ#issuecomment-531680730, or mute the thread https://github.com/notifications/unsubscribe-auth/AGEFLFENT3NBG3FX6DYUVMLQJ452NANCNFSM4IR25LDQ .

adogth commented 5 years ago

Hi i fixed the react navigation in navigation/index with import { createAppContainer } from "react-navigation"; import { createStackNavigator } from "react-navigation-stack";

ThPch commented 4 years ago

import { createAppContainer } from "react-navigation"; import { createStackNavigator } from "react-navigation-stack";

Doesn't work for me

hetmann commented 4 years ago

@ThomasPerche I need to update this app to the latest version for react-navigation and expo

Oguntoye commented 4 years ago

I've personally find this react navigation too bugy.. quite okay with react native navigation...

Must more stable and also better in performance wise.

On Tue, Dec 17, 2019, 8:30 AM Hetmann W. Iohan notifications@github.com wrote:

@ThomasPerche https://github.com/ThomasPerche I need to update this app to the latest version for react-navigation and expo

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-ui-kit/dribbble2react/issues/46?email_source=notifications&email_token=AGEFLFH2G2JPSHSNHSLGRN3QZCEZ3A5CNFSM4IR25LD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHBSOAA#issuecomment-566437632, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGEFLFD32P5UQ6VRVJQAEETQZCEZ3ANCNFSM4IR25LDQ .

hetmann commented 4 years ago

@Oguntoye the v5 of react-navigation is much better compared to < v4 I like the new approach, component based and more like ReactJS style :)

hetmann commented 4 years ago

@Oguntoye @naveedahmed986 @ahunain @jestintab @ThomasPerche @priteshbaviskar all the apps have been updated to use Expo SDk 36. This should fix all the errors.

coderDancer commented 4 years ago

@ThomasPerche I need to update this app to the latest version for react-navigation and expo

I update this app to the right version for react-navigation , go well finally