2017-08-04 79 views
-2

說明 --- 當我克隆從GitHub一個項目,對象npm install react-native run-ios後,會出現以下錯誤:未定義不是一個對象(計算' _reactNative.ViewPropTypes.style')未定義不是(評價「_reactNative.ViewPropTypes.style」)

Here is the error screenshot

附加資料

  1. 反應母語-CLI:2.0.1
  2. 反應母語:0.44

我的主頁的代碼 -

import React, {Component} from 'react'; 
import { 
    StyleSheet 
} from 'react-native'; 

import { Actions } from 'react-native-router-flux'; 
import { Container, Header, Title, Button, Left, Right, Body, Icon } from 'native-base'; 

import Button1 from './Button'; 
import StreamStripContainer from '../containers/StreamStripContainer'; 
import StreamElementsContainer from '../containers/StreamElementsContainer'; 

class Stream extends Component { 
    render() { 
    return (
     <Container style={{backgroundColor: '#F5F5F5'}} > 
      <Header> 
       <Left> 
        <Button transparent> 
         <Icon name='menu' /> 
        </Button> 
       </Left> 
       <Body> 
        <Title>Stream</Title> 
       </Body> 
       <Right> 
        <Button transparent> 
         <Icon name='search' /> 
        </Button> 
       </Right> 
      </Header> 
      <StreamStripContainer /> 
      <StreamElementsContainer /> 
      {/* <Button1 onPress={Actions.content} title='Go To Next Scene' /> */} 
     </Container> 
    ); 
    } 
} 

const styles = StyleSheet.create({ 
    container: { 
    backgroundColor: '#F5F5F5' 
    } 
}); 

export default Stream; 
+0

這是非常不可能的,以幫助沒有你正在試圖運行代碼的更多信息。 –

+0

你需要什麼信息? –

+0

你試圖運行什麼代碼? –

回答

0
通過更新本機基地2.1.4作爲我的反應原生版本

解決誤差爲0.44

View.propTypes已被棄用,取而代之ViewPropTypes從RN44,這是在NativeBase的最新版本中引入以及使用。所以RN44去NativeBase v2.1.4和任何低於RN44,你可以使用NB V2.1.3

-1

即與反應本地路由器通量的問題,您的react-native版本與react-native-router-flux的版本不兼容。 升級您的react-native-router-flux版本。 This可能會有所幫助。

相關問題