The @expo/vector-icon files are all where they should be
I use the following to clear it all out when I try something rm -rf node_modules && npm cache clean --force && rm -rf .expo && rm yarn.lock && yarn
and expo start -c
Any idea what might be keeping the vector icon fonts from loading?
ps: I am attempting to replicate via a snack, but with no luck yet
So this is where things are a little odd. I have an existing metro.config that I use for react-native-sass-transformer. I tried adding the svg transformer and using @expo/metro-config, but using @expo/metro-config in place of ‘metro-config’ breaks the build
If I use require(‘metro-config’) instead the build works but there’s no change in the error. Do I really need to all of a sudden use “react-native-svg-transformer” for @expo/vector-icons to work? Why wouldn’t I have needed that before? I also thought the metro-config transformer wasn’t necessary for those components, only custom fonts or other packages.
Ok, so came up with a solution. The problem stemmed from needing to have multiple transformers and how that interacts with the new way to handle metro with Expo v40.
If you don’t have multiple transformers you can skip that part of the solution and just rely on the github response.
Solution:
Add react-native-svg-transformer. For me this was yarn add react-native-svg-transformer -d
Update metro.config.js according to this github comment, except use the new transformer in place of the babelTransformPath (refer back to stackoverflow for this).
The reason my attempts weren’t working was because I was using this from Stackoverflow: