Ionicons with React Native results in "Error: Font failed to load"

1.3k views Asked by At

I have a React Native iOS app (no Expo) that uses Ionicons. I am loading Ionicons in multiple files with the two lines import Ionicons from 'react-native-vector-icons/Ionicons' and Ionicons.loadFont().

Last month (September 2022), these two lines loaded Ionicons successfully.

However, after cloning my repo and running npx react-native run-ios I receive multiple error messages in my terminal stating WARN Possible Unhandled Promise Rejection (id: 6): Error: Font failed to load. Please can anyone help resolve this?

Things I have tried that did not work: 1) deleting node modules and npm install, 2) cd ios && pod install, 3) quitting and rerunning simulator and terminal commands

1

There are 1 answers

1
Emre ÖZCAN On
import Ionicons from '../node_modules/react-native-vector-icons/Ionicons';

can you try to import like this and copy paste the terminal result to here