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:
srcimagesavatar.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-fontsmontserratMontserrat_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?
2
Answers
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.
————————-INSTALL LATEST NODEJS—————