satya164 / PocketGear

A clean and simple Pokédex app for Pokémon GO
199 stars 54 forks source link

Expo: MaterialIcons is not a system font error. #17

Closed Alderr closed 7 years ago

Alderr commented 7 years ago

I am using Expo on my HTC Desire 530 to test it. The error mentioned in title does not show when I run it from the Expo display, it happens when I run it from my machine(npm start -> server launches -> takes picture of QR Code).

Disclaimer: First time ever really using any of these libraries/tech/etc so Im going to show every single step I've done that brought me to the error.

[1] Cloned repo, npm install, yarn. Nothing wrong so far.

[2] I run "npm start" and this error pops up.

errorbabelenv

[3] Googled this. A Babel.rc guide So, I ended up just removing "BABEL_ENV" from npm start command in package.json and doing it in the command prompt.

1stpackjson setbabelenv

[4] Packager runs, I get my QR Code and I scan it.

qrcode

[5] Error shows up and a lot of the icons end up missing or replaced with something else. screenshot_20170628-001353 screenshot_20170628-001409 screenshot_20170628-001813

satya164 commented 7 years ago

Hmm.. That's weird. I dunno much about windows to say what's the issue. The simple workaround will be to change the preset to expo from react-native in .babelrc.

After changing it, make sure to run npm start -- --reset-cache

Alderr commented 7 years ago

Cool, it works but now haha I'm wondering why this works and how this will affect me when using react-native-vector-icons in my CRNA projects.

satya164 commented 7 years ago

@Alderr this is a mixed vanilla + CRNA project, that's why you faced the issue. I believe no one has done it before, so don't know the proper way yet.

You won't face any such issue with normal CRNA projects.