react-native-elements / react-native-elements-app

Demo app for React Native Elements (w/ React Native Web)
https://reactnativeelements.com/
1.29k stars 417 forks source link

Module not found: Can't resolve '@expo/vector-icons/src/vendor/react-native-vector-icons/Fonts/Entypo.ttf' #114

Closed tinhan closed 3 years ago

tinhan commented 4 years ago

Module not found: Can't resolve '@expo/vector-icons/src/vendor/react-native-vector-icons/Fonts/Entypo.ttf'

WillDent commented 4 years ago

This only happens when trying to run the web version, not the mobile apps for me.

galoppi commented 4 years ago

Change src/helpers/vector-fonts.web.js as follows:

export default [
  {
    FontAwesome: require('@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/FontAwesome.ttf'),
  },
  {
    Ionicons: require('@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Ionicons.ttf'),
  },
  {
    Entypo: require('@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/Entypo.ttf'),
  },
  {
    SimpleLineIcons: require('@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/SimpleLineIcons.ttf'),
  },
  {
    MaterialIcons: require('@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialIcons.ttf'),
  },
  {
    MaterialCommunityIcons: require('@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf'),
  },
];

The paths changed from @expo/vector-icons/src/ to @expo/vector-icons/build/.