Bare workflow + sdk 39 unrecognized fontFamily error

  1. SDK Version: 39
  2. Platforms(Android/iOS/web/all): iOS simulator

I recently ejected our expo app but still want to use the expo managed workflow to expedite onboarding and workflow with our designers. According to the docs it is still possible to use the expo sdk when ejected as long as no native modules are called. So I commented out code that uses native modules but am now running into the same error that was reported here SDK 37: Unrecognized font family.

I made sure to expo-install expo-font and react-native-svg because I suspect the error has to do with those packages. When I dismiss the error, the app still works. However the icons imported from icon libraries in @expo/vector-icons and the fonts don’t render correctly.

I’ve tried all of the suggested solutions in the thread i linked to above. Unfortunately the thread is closed and pertained to an older sdk, hence the new thread.

I should also mention everything works fine when I build the bare version of the app. I used expo-install to install expo-font and react-native-svg (the 2 packages that I suspect are causing the error) so they should be compatible with sdk 39.

Update:
I’ve determined that the error only occurs when setting EXPO_USE_DEV_SERVER=true. Unfortunately it’s pretty important for us to set this variable because we use source extensions other than the default to override the behavior of many js files.

Could anyone potentially offer some insight as to why source extensions configured using metro.config.js only work when EXPO_USE_DEV_SERVER is set to true?

Alternatively, does anyone have any idea why the “unrecognized fontFamily error” only occurs when EXPO_USE_DEV_SERVER=true?

Steps to reproduce minimal example:

  1. Run expo init
  2. Choose bare-workflow minimal js template app
  3. Add code for custom (not google) font as per this guide
  4. export EXPO_USE_DEV_SERVER=true
  5. Run expo start and observe the error

Update^2:
Resolved in this issue: https://github.com/expo/expo-cli/issues/3005

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.