[SOLVED] Font.isLoaded is not a function - @expo/vector-icons

#1

Hi!
I have problems with Expo sdk 31.0.0.
I’m trying to use Material Icons like this:

Import {MaterialIcons} from ‘@expo/vector-icons’.

But anytime I’m trying to use MaterialIcons in render func app fails wil error Font.isLoaded is not a function.

All was been working untipl I upgraded react native. After this, I was trying to set up application from zero using expo init, but it didin’t help

I successfully using custom fonts that loaded via Font.loadAsync

#2

Hey ,
im having the same issue and just exactly as you said it happened i updated react native

2 Likes
#3

I have a project should be delver today!,
thanks to you PEOPLE!!

2 Likes
#4

JUST now realize notes were posted.

https://github.com/expo/expo/blob/master/CHANGELOG.md - check this

SOLVED BY updating @expo/vector-icons

1 Like
#5

i still have the same problem!

1 Like
#6

Any solution for this?

#7

Did you upgrade your Expo sdk to 32.0.0?

Also, try to delete package-lock.json, delete node_modules directory and then install all again with npm install

#8

Hi rapture,

Yes… Deleted package-lock.json, nodemodules and then changes expo sdk version in app.json to 31 and in package.json to 31.0.1

But Still I am getting error mentioned below
TypeError: Font.isLoaded is not a function. (In ‘Font.isLoaded(fontName)’, ‘Font.isLoaded’ is undefined)

#9

Change to 32 (the lastest).

Check this:https://docs.expo.io/versions/v32.0.0/workflow/upgrading-expo-sdk-walkthrough

#10

Changes to 32 but now throws diff error…

undefined is not an object(evaluating expo2.default.registerRootComponent )

#11

Even after deleting package-lock and reinstall npm?

#12

Yes after deleting package-lock.json and node-modules… the error throwa

#13

Solved the issue by setting up AppEntry.js from expo package… Cheers

#16

in my case i go to app.json & package.json then i chaged those expo version to 32.0.0, save and do “npm install” but i still got error after doing that

like this => "Unable to resolve “./Amplitude” from “node_modules\expo\build\Expo.js”
and then i use the command “expo start -c” and then doing “npm start” again…

and all my problems were resolved and I was able to run my expo without error ^^

2 Likes
#17

Updating solved my issue with <Icon> causing this error with react-native!

I was using a <Picker> and the property iosIcon={<Icon name="arrow-down" />} (which i got straight from the docs) I would get the Font.isLoaded is not a function (undefined) error.

I was at 31.0.2, changed my package.json to ^32.0.0 and it installed 32.0.1.

Working nicely, now :slight_smile:

closed #18

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