I keep getting this error. My app has been working perfectly for days but I was having some trouble with env files so I did a complete reinstall and cleaned my cache. Now whenever I try to build the app I get this error:
src\images\avatar.jpg: assetUrlPath.replaceAll is not a function
This isn't just happening with images either, I also ran into this error with my fonts:
node_modules\@expo-google-fonts\montserrat\Montserrat_400Regular.ttf: assetUrlPath.replaceAll is not a function
I have removed node_modules, deleted the package-lock.json, cleared my cache again, reinstalled, reinstalled expo, and nothing.
What's more when you put the error into google you get zero results for react-native. What am I doing incorrectly?
Answering this just in case someone runs across this error. I am using nvm and forgot that my node version was set to 14. Setting to 18 fixed the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With