Issue importing custom icons

is there a bug creating custom icons with expo version 25.0.0? When trying to :

import { createIconSetFromFontello } from ‘@expo/vector-icons’;

I get the error: _expo.Font.style is not a function. (In ‘_expo.Font.style(expoFontName)’, ‘_expo.Font.style’ is undefined.

in the node modules createIconSetFromFontello.js

import { Font } from ‘expo’;
import createIconSetFromFontello from ‘./vendor/react-native-vector-icons/lib/create-icon-set-from-fontello’;

export default function(config, expoFontName, expoAssetId) {
return createIconSetFromFontello(config, Font.style(expoFontName).fontFamily, expoAssetId);
}

Any suggestions?

hi! this is fixed in sdk26, you can update with the instructions in Expo SDK v26.0.0 is now available | by Brent Vatne | Exposition

alternatively, you can install the newest version of ‘@expo/vector-icons’ temporarily (be sure to remove the manual installation when you update to sdk26) to resolve the issue. the latest version is 6.3.1

1 Like

For anyone else running into this, update with

yarn upgrade expo

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