說明 --- 當我克隆從GitHub一個項目,對象npm install react-native run-ios
後,會出現以下錯誤:未定義不是一個對象(計算' _reactNative.ViewPropTypes.style')未定義不是(評價「_reactNative.ViewPropTypes.style」)
附加資料
- 反應母語-CLI:2.0.1
- 反應母語: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;
這是非常不可能的,以幫助沒有你正在試圖運行代碼的更多信息。 –
你需要什麼信息? –
你試圖運行什麼代碼? –