Snack Bug? - Unable to resolve module 'module://expo-font.js

This snack throws the error “Unable to resolve module 'module://expo-font.js”
https://snack.expo.io/@chrish/example-app

However this snack running the exact same code does not.
https://snack.expo.io/@chrish/ecommerce-app

Is this a bug with the Snack editor?

I have this same problem. It was reported before but then the team only responded about react-native-screens not react-native-elements and expo-font. What’s the deal here?

Especially annoying, today I copied in all of the raw code from react-native-elements for the and it works just fine.

There is a subcomponent /config/fonts.js that is used, but the code there shouldn’t be any problem. Does importing that conflict with expo-font.js somehow that it wouldn’t with the code in the project?

export default {
  android: {
    regular: {
      fontFamily: 'sans-serif',
    },
    light: {
      fontFamily: 'sans-serif-light',
    },
    condensed: {
      fontFamily: 'sans-serif-condensed',
    },
    condensed_light: {
      fontFamily: 'sans-serif-condensed',
      fontWeight: 'light',
    },
    black: {
      // note(brentvatne): sans-serif-black is only supported on Android 5+,
      // we can detect that here and use it in that case at some point.
      fontFamily: 'sans-serif',
      fontWeight: 'bold',
    },
    thin: {
      fontFamily: 'sans-serif-thin',
    },
    medium: {
      fontFamily: 'sans-serif-medium',
    },
    bold: {
      fontFamily: 'sans-serif',
      fontWeight: 'bold',
    },
  },
  default: {},
};

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