ignite-andross icon indicating copy to clipboard operation
ignite-andross copied to clipboard

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

Open alireza-bakhshifar opened this issue 4 years ago • 27 comments

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😬

alireza-bakhshifar avatar Feb 15 '20 12:02 alireza-bakhshifar

Running into the same issue. Any updates by chance?

pvshum avatar Feb 18 '20 14:02 pvshum

+1

kaladin9017 avatar Feb 19 '20 02:02 kaladin9017

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'

nazrdogan avatar Feb 24 '20 13:02 nazrdogan

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

2IhsanWp avatar Mar 09 '20 11:03 2IhsanWp

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

nazrdogan avatar Mar 09 '20 12:03 nazrdogan

@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

2IhsanWp avatar Mar 09 '20 13:03 2IhsanWp

+1

mrbrackins avatar Mar 20 '20 07:03 mrbrackins

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

pjnovas avatar Mar 20 '20 22:03 pjnovas

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

pjnovas avatar Mar 21 '20 04:03 pjnovas

@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 avatar Apr 04 '20 05:04 akash89b

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

akash89b avatar Apr 04 '20 06:04 akash89b

@akash89b ignore the warning, it will work just fine

pjnovas avatar Apr 04 '20 15:04 pjnovas

@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

mrbrackins avatar Apr 04 '20 20:04 mrbrackins

Did anyone find so solution. I get the same error

HamzaTatheer avatar Apr 09 '20 05:04 HamzaTatheer

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.

caesar3x avatar Apr 21 '20 13:04 caesar3x

I also met, when will it be fixed?

FlyingTigerReally avatar Apr 23 '20 07:04 FlyingTigerReally

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

guglie avatar Apr 26 '20 18:04 guglie

@guglie Thanks. Worked for me as well.

moksamedia avatar May 03 '20 02:05 moksamedia

Anyone want to submit a PR?

jamonholmgren avatar May 06 '20 19:05 jamonholmgren

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

f97-2308 avatar May 13 '20 15:05 f97-2308

Hello i got this error too. Whats happening?

chimemoo avatar May 15 '20 17:05 chimemoo

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

manminder01 avatar Jun 01 '20 06:06 manminder01

why using old navigations.?

manminder01 avatar Jun 01 '20 06:06 manminder01

please update this boilerplate and dependencies @jamonholmgren

ameinabdi avatar Jun 01 '20 19:06 ameinabdi

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

jamonholmgren avatar Jun 13 '20 22:06 jamonholmgren

@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! https://github.com/infinitered/ignite/pull/1556 Thank you for your support to the community. ❤️

jay-jlm avatar Jun 14 '20 16:06 jay-jlm

Hi,

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

  • Install the app with minimum features (no vector icons, etc.)
  • Install iOS pods: cd ios && pod install && cd ../
  • Uninstall current react-navigation v3: npm uninstall react-navigation
  • Upgrade to react-navigation v4: https://github.com/react-navigation/react-navigation/releases/tag/v4.0.0
  • Change Java version to 8 or 9: https://stackoverflow.com/questions/21964709/how-to-set-or-change-the-default-java-jdk-version-on-os-x
  • Clear Gradle caches in a system and in a project: https://stackoverflow.com/questions/23025433/how-to-clear-gradle-cache
  • Upgrade to Gradle 6: https://github.com/software-mansion/react-native-screens/issues/353#issuecomment-599076696

spetushkov avatar Jul 16 '20 12:07 spetushkov