react-native-router-flux: SyntaxError /node_modules/react-native-router-flux/src/navigationStore: Unexpected token (18:0)

Version

  • react-native-router-flux v4.0.0-alpha.4
  • react-native v0.41.x
  • typescript 2.3.2

Details

I do the straightforward route creation:

<View style={{flex: 1, backgroundColor: Layout.backgroundColor.white}}>
        <View style={styles.app}>
          <Router sceneStyle={{backgroundColor:'#fff'}}>
            <Scene key="root">
              <Scene key="tour" initial={initialRouteName === 'tour'} component={Tour}/>
              <Scene key="signup" initial={initialRouteName === 'signup'} component={SignUp}/>
              <Scene key="register" component={Register}/>
              <Scene key="login" component={Login}/>
              <Scene key="main" tabs={true} initial={initialRouteName === 'main'}>
                <Scene key="feed" component={Feed} icon={selected => (<Image source={selected ? iconFeed : iconFeedGray}/>)
                  }></Scene>
                <Scene key="map" component={View} icon={selected => (<Image source={selected ? iconMap : iconMapGray}/>)
                  }></Scene>
                <Scene key="camera" component={Scan} icon={selected => (<Image source={selected ? iconCamera : iconCameraGray}/>)
                  }></Scene>
                <Scene key="search" component={View} icon={selected => (<Image source={selected ? iconFind : iconFindGray}/>)
                  }></Scene>
                <Scene key="profile" component={Profile} icon={selected => (<Image source={selected ? iconProfile : iconProfileGray}/>)
                  }></Scene>
              </Scene>
            </Scene>
          </Router>
        </View>
      </View>

And got the error dictated in the title. Is this dependency problem? Thank you very much

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@thanhtr, after my “solving” method I had another issue 😦 So I downgraded my version to 3.40.1 and now I don’t have any problem.t

@mistenkt Fixed now, thanks.