question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fontFamily "material" is not a system font when using Expo

See original GitHub issue

Environment

Expo SDK 35 react-native-paper 2.16.0

Description

Trying to use react-native-paper components in an expo project, I receive the error “fontFamily “material” is not a system font and has not been loaded through Font.loadAsync.”. The docs state that when using expo, there is no need to install vector-icons as it is prepackaged with expo, so I am not sure where the issue lies. I see an open issue for this dating back to earlier this year with no definitive solution but suggesting to load the fonts via await Font.loadAsync({ 'MaterialIcons': require('@expo/vector-icons/fonts/MaterialIcons.ttf') }), but I do not have a fonts directory under vector-icons.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

26reactions
nsdubcommented, Oct 1, 2019

I hit a similar issue with Font.loadAsync() after upgrading to Expo SDK 35 (and 34). The fix for me was to:

  1. Delete node_modules folder: rm -rf node_modules
  2. Delete package-lock.json
  3. Run npm install
8reactions
Arjun-Aggarwalcommented, Dec 11, 2019

Hi, I am facing the same issue. I tried removing and reinstalling node_modules; however, it did not work for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expo: fontFamily 'SimpleLineIcons' is not a system font and ...
The simple-line-icons that i loaded in only worked for iOS and so on Android i got this error: fontFamily 'SimpleLineIcons' is not a...
Read more >
fontFamily "material" is not a system font and has not ... - GitHub
To fix it, I just ran yarn remove expo-font and then ran expo install expo-font . Using expo to install rather than yarn...
Read more >
Custom fonts - Expo Documentation
If you don't want to use a custom font, your best bet is to use the platform's default font by not specifying a...
Read more >
[Solved]-font family materialicon not system font-React Native
font family materialicon not system font · React Native - Expo: fontFamily 'SimpleLineIcons' is not a system font and has not been loaded...
Read more >
font.loadasync not working
fontFamily 'Feather' is not a system font and has not been loaded through Expo.Font.loadAsync. If you intended to use a system font, make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found