expo / vector-icons

https://icons.expo.fyi
MIT License
650 stars 113 forks source link

fontFamily "entypo" is not a system font and has not been loaded through Font.loadAsync #125

Closed lucasreppewelander closed 4 years ago

lucasreppewelander commented 4 years ago

Suddenly my app stopped to work with the following error: fontFamily "entypo" is not a system font and has not been loaded through Font.loadAsync.

  Expo CLI 3.11.7 environment info:
    System:
      OS: macOS 10.15.3
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 10.16.3 - /usr/local/bin/node
      Yarn: 1.22.0 - /usr/local/bin/yarn
      npm: 6.13.7 - /usr/local/bin/npm
    IDEs:
      Xcode: 11.2/11B52 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^36.0.0 => 36.0.2
      react: 16.9.0 => 16.9.0
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
      react-navigation: ^4.0.10 => 4.0.10
    npmGlobalPackages:
      expo-cli: 3.11.7

Tried to import Entypo from @expo/vector-icons without luck, below is the code I tried with: I'm currently using vector-icons 10.0.6

import { AppLoading } from 'expo';
import { Asset } from 'expo-asset';
import * as Font from 'expo-font';
import { Ionicons, Entypo } from '@expo/vector-icons';

async function loadResourcesAsync() {
   await Promise.all([
      Asset.loadAsync([
         require('./assets/images/robot-dev.png'),
         require('./assets/images/robot-prod.png'),
         require('./assets/images/abstract-background.png')
      ]),
      Font.loadAsync({
         // This is the font that we are using for our tab bar
         ...Ionicons.font,
         ...Entypo.font
         // We include SpaceMono because we use it in HomeScreen.js. Feel free to
         // remove this if you are not using it in your app
         // 'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
      }),
   ]);
}

sidenote, I'm using expo managed workflow and pretty recently upgrade to SDK 36 from SDK 35, but it has worked after the upgrade until today when my app won't even load in the simulator nor in a physical iphone.

I've also tried to remove node_modules and reeinstall everything again without success..

brentvatne commented 4 years ago

heya, we usually monitor issues on https://github.com/expo/expo rather than here. i imagine you found solution, but if not just post an app that can reproduce it and i will be happy to help.