使用@ expo / vector-icons时出现此错误。我该如何解决这个问题?
我尝试运行npm install并升级博览会,但仍然出现错误。
import React, { Component } from 'react';
import { ScrollView, StatusBar } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { ListItem, Separator } from '../components/List';
const ICON_COLOR = '#868686';
const ICON_SIZE = 23;
class Options extends Component {
handlePressThemes = () => {
console.log('press themes');
};
handlePressSite = () => {
console.log('press site');
};
render() {
return (
<ScrollView>
<StatusBar translucent={false} barStyle="default" />
<ListItem
text="Themes"
onPress={this.handlePressThemes}
customIcon={<Ionicons name="arrow-right" size={ICON_SIZE} color={ICON_COLOR} />}
/>
<Separator />
<ListItem
text="Fixer.io"
onPress={this.handlePressSite}
customIcon={<Ionicons name="link" size={ICON_SIZE} color={ICON_COLOR} />}
/>
<Separator />
</ScrollView>
);
}
}
export default Options;