infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more! 9 years of continuous development and counting.
MIT License
17.7k stars 1.4k forks source link

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

Closed JimLynchCodes closed 4 years ago

JimLynchCodes commented 4 years ago

What's going on?

I scaffolded a fresh project with this config and am getting an error when I run the project.

Screen Shot 2020-01-21 at 8 07 53 PM


Steps to reproduce

ignite new FunTimesAnd

npm i yarn install

Then I went into the project and tried to run npx react-native run-ios, but I get the error in the title of this issue. Here's a screenshot also:

Screen Shot 2020-01-21 at 8 40 55 PM


ignite doctor results:

FunTimesAnd (master) ⚾ ignite doctor System platform darwin
arch x64
cpu 12 cores Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz
directory FunTimesAnd /Users/jimb0/Git-Projects/Fun-With-React-Native-2020/fun-4-ignite-andross/FunTimesAnd

JavaScript node 11.15.0 /Users/jimb0/.nvm/versions/node/v11.15.0/bin/node npm 6.7.0 /Users/jimb0/.nvm/versions/node/v11.15.0/bin/npm
yarn 1.17.3 /Users/jimb0/.nvm/versions/node/v11.15.0/bin/yarn

Ignite ignite-cli 3.5.1 /usr/local/bin/ignite
ignite src build /Users/jimb0/.config/yarn/global/node_modules/ignite-cli/build createdWith 3.5.1
boilerplate ignite-andross
examples classic
navigation react-navigation
askToOverwrite true
generators {"component":"ignite-andross","container":"ignite-andross","list":"ignite-andross","redux":"ignite-andross","saga":"ignite-andross","screen":"ignite-andross","listview":"ignite-andross"}
boilerplateVersion 4.2.0

Android java 1.8.0_232 /usr/bin/java
android home - /usr/local/share/android-sdk

iOS xcode 11.3.1
cocoapods 1.8.4 /usr/local/bin/pod

Thanks! 🙏 ❤️ 🔥

morgandonze commented 4 years ago

Hi @JimLynchCodes sorry you're having a problem with Ignite. We will try to reproduce it and help you if we can!

morgandonze commented 4 years ago

Good news! I was able to reproduce this error today! I'm studying the problem now.

morgandonze commented 4 years ago

I tested with the following setup, but could not reproduce.

~/Documents/dev ⫸ ignite doctor
System
  platform           darwin                                                                     

  arch               x64                                                                        
  cpu                12 cores                          Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz 
  directory          /Users/morganlaco/Documents/dev                                            

JavaScript
  node               8.16.0       /Users/morganlaco/.nvm/versions/node/v8.16.0/bin/node 
  npm                6.4.1        /Users/morganlaco/.nvm/versions/node/v8.16.0/bin/npm  
  yarn               1.19.1       /usr/local/bin/yarn                                   

React Native
  react-native-cli   2.0.1      

Ignite
  ignite-cli         3.1.5        /usr/local/bin/ignite 

Android
  java               1.8.0_231    /usr/bin/java                         
  android home       -            /Users/morganlaco/Library/Android/sdk 

iOS
  xcode              11.3.1     
JimLynchCodes commented 4 years ago

Thanks @mlaco! I was trying it with node v12 and v11. It seems like node v8 is working for you so maybe ignite only supports older versions of nodejs? 🤔

morgandonze commented 4 years ago

You're welcome, @JimLynchCodes! It's actually not Ignite causing this problem, it's the Andros boilerplate. We are currently in "community support" phase of Andross, which means we're happy to review and merge pull requests and release new versions, but we don't use Andross anymore ourselves, so we rely on the community to provide fixes for issues. I recommend you try out Ignite Bowser!

JimLynchCodes commented 4 years ago

Thanks @mlaco!

Unfortunately, I tried with node v8 and got the exact same error message. 😞

yudori commented 4 years ago

I had the same issue and updating react-navigation-stack to version 2.0.16 helped solve it for me. However, I ran into a series of other errors so here are the total version updates I had to make in my package.json to bootstrap the base project successfully (with DevScreens):

{
    ...
    "react-navigation": "3.13.0",
    "react-navigation-redux-helpers": "3.0.7",
    "react-navigation-stack": "2.0.16",
    "@react-native-community/masked-view": "0.1.6",
    "react-native-safe-area-context": "0.6.4",
    "react-native-screens": "^2.0.0-alpha.32",
    ...
}
charles-csilva commented 4 years ago

You're welcome, @JimLynchCodes! It's actually not Ignite causing this problem, it's the Andros boilerplate. We are currently in "community support" phase of Andross, which means we're happy to review and merge pull requests and release new versions, but we don't use Andross anymore ourselves, so we rely on the community to provide fixes for issues. I recommend you try out Ignite Bowser!

Why did you guys close a crash issue asking us to switch to bowser boilerplate? This is not a solution! How the community would to keep track of the problem and fix it? You guys should get rid of Andross so.

izilla commented 4 years ago

@yudori that solution works for me too is this something that should PR'd