Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

TypeError: undefined is not an object (evaluating '_reactNavigation.ThemeColors.light') #304

Open
alireza-bakhshifar opened this issue Feb 15, 2020 · 27 comments

Comments

@alireza-bakhshifar
Copy link

alireza-bakhshifar commented Feb 15, 2020

Hi , I built a project with ignite-Andross and now I am getting this error when I run the project
SharedScreenshot

The project builds successfully and runs without any trouble on node.js server but I confront this error on the emulator , I searched this issue on the internet and everybody was suggesting upgrading react-navigation , So I upgraded react-navigation but then lots of error appeared in the CLI like react-native run-android is not a recognized command.
Can anybody help me?🤔 I need help ASAP😬

@pvshum
Copy link

pvshum commented Feb 18, 2020

Running into the same issue. Any updates by chance?

@kaladin9017
Copy link

+1

@nazrdogan
Copy link

nazrdogan commented Feb 24, 2020

As a workaround solution change like or add missing packages to package.json.

   "@react-native-community/masked-view": "^0.1.6",
    "react-native-gesture-handler": "^1.6.0",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^2.0.0-beta.10",
    "react-navigation": "4.1.1",
    "react-navigation-stack": "^2.1.1",
    "react-navigation-tabs": "^2.7.0",

Also need to setup react-native-screens

Add the following two lines to dependencies section in android/app/build.gradle

implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'

@2IhsanWp
Copy link

2IhsanWp commented Mar 9, 2020

As a workaround solution change like or add missing packages to package.json.

   "@react-native-community/masked-view": "^0.1.6",
    "react-native-gesture-handler": "^1.6.0",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^2.0.0-beta.10",
    "react-navigation": "4.1.1",
    "react-navigation-stack": "^2.1.1",
    "react-navigation-tabs": "^2.7.0",

Also need to setup react-native-screens

Add the following two lines to dependencies section in android/app/build.gradle

implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'

still not work

@nazrdogan
Copy link

@2IhsanWp what error you get now ? if its same error like before it might be caching issue. I suggest clear all caches.

@2IhsanWp
Copy link

2IhsanWp commented Mar 9, 2020

@2IhsanWp what error you get now ? if its same error like before it might be caching issue. I suggest clear all caches.

yah still the same,and i did all solution you mention above

error

@mrbrackins
Copy link

+1

@pjnovas
Copy link

pjnovas commented Mar 20, 2020

just trying ignite for the first time and I'm having the same issue

@pjnovas
Copy link

pjnovas commented Mar 21, 2020

alright, it took me some time to figure it out but the issue is in the following paths

  • ignite/DevScreens/PluginExamplesScreen.js
  • ignite/DevScreens/PresentationScreen.js

change the line:

import { createStackNavigator, createAppContainer } from 'react-navigation'

into:

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

I did that after going through upgrading react-navigation to v4 guide so if that doesn't work try upgrading.

If you are on react-native v0.60+ (I'm on v0.61.4) just run:

npm i --save react-navigation react-navigation-stack@^1.7.3 react-navigation-tabs@^1.2.0 react-navigation-drawer@^1.4.0 react-native-reanimated react-native-screens

I was going to send a PR but I couldn't find those files in this repo, I'll look for 'em again later

@akash89b
Copy link

akash89b commented Apr 4, 2020

@pjnovas - on trying to run the npm command you have mentioned above, I get warnings which says deprecated.
Also, above mentioned solution does not work. Still face the same issue.

@akash89b
Copy link

akash89b commented Apr 4, 2020

@alireza-bakhshifar - i am also running into the same issue and not able to find any solution.
Were you able to fix it?

@pjnovas
Copy link

pjnovas commented Apr 4, 2020

@akash89b ignore the warning, it will work just fine

@mrbrackins
Copy link

@pjnovas this fixed that particular error. Now seeing a "1437" error and a Invariant Violation: Module RCTEventEmitter is not a registered callable module (calling receiveTouches)

callFunctionReturnFlushedQueue
[native code]:0

@HamzaTatheer
Copy link

Did anyone find so solution. I get the same error

@caesar3x
Copy link

I made it works after changing version of react-navigation and install some more modules.

Here is my finally module list:

"@react-native-community/masked-view": "^0.1.9",
"apisauce": "^1.1.1",
"format-json": "^1.0.3",
"identity-obj-proxy": "^3.0.0",
"lodash": "^4.17.15",
"prop-types": "^15.7.2",
"querystringify": "^2.1.1",
"ramda": "^0.27.0",
"ramdasauce": "^2.1.3",
"react": "16.9.0",
"react-native": "0.61.4",
"react-native-animatable": "^1.3.3",
"react-native-config": "^0.12.0",
"react-native-device-info": "^1.6.1",
"react-native-gesture-handler": "1.3.0",
"react-native-i18n": "2.0.14",
"react-native-safe-area-context": "0.6.4",
"react-native-screens": "^2.0.0-alpha.32",
"react-native-vector-icons": "6.1.0",
"react-navigation": "4.0.10",
"react-navigation-redux-helpers": "^4.0.1",
"react-navigation-stack": "2.0.16",
"react-navigation-tabs": "^2.5.6",
"react-redux": "^7.1.3",
"redux": "^4.0.4",
"redux-persist": "^5.10.0",
"redux-saga": "^1.1.3",
"reduxsauce": "^1.1.1",
"seamless-immutable": "^7.1.4"

Hope it helps.

@FlyingTigerReally
Copy link

I also met, when will it be fixed?

@guglie
Copy link

guglie commented Apr 26, 2020

I confirm that following this guide as suggested by @pjnovas worked

@moksamedia
Copy link

@guglie Thanks. Worked for me as well.

@jamonholmgren
Copy link
Member

Anyone want to submit a PR?

@f97-2308
Copy link

Hix, still error... It need a merge request.

@chimemoo
Copy link

Hello i got this error too. Whats happening?

@manminder01
Copy link

i am also facing the same issue.
not sure why.
Screenshot_1590992018

@manminder01
Copy link

why using old navigations.?

@ameinabdi
Copy link

please update this boilerplate and dependencies @jamonholmgren

@jamonholmgren
Copy link
Member

@ameinabdi This boilerplate is now on community support, which means we rely on the community to provide boilerplate updates. Thanks!

@jay-jlm
Copy link

jay-jlm commented Jun 14, 2020

@jamonholmgren , if so, then we need to update this Boilerplates.md document, right? 😉
screenshot-github com-2020 06 14-13_15_23

I will see if I can submit a PR (to fix the md, not the issue).

UPDATE: PR submitted! infinitered/ignite#1556
Thank you for your support to the community. ❤️

@spetushkov
Copy link

Hi,

these steps helped me to run the app in iOS and Android simulators:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests