I am getting an error when trying to run or build my React Native Expo app. The issue is coming from an SVG that I am using.
At first I thought it was to do with SVGs in general, but I have found out that it is with a particular SVG.
I downloaded the SVG from Apple directly (here). I am using the 'Add to Apple Wallet Badges/US_UK/RGB/US-UK_Add_to_Apple_Wallet_RGB_101421.svg' SVG. When I run the app with npx expo run:ios or I try to build my app for both Android and iOS, I get an error:
error: assets/wallet/addToAppleWalletSVG.svg: Cannot set properties of undefined (setting 'shouldTestNextSiblings')
I have tried altering my metro.config.js but wasn't sure if this was necessary given the other SVGs I am using are fine. I also saw recommendations to use and SVG optimiser, I did try this and it still resulted in the same error, plus I didn't want to opt for that as Apple are pretty strict with using their assets.
EDIT
Within the SVG file, there is a <style> tag, I tried removing this and the error was fixed. However I feel like this isn't a great solution.
EDIT 2
As expected, removing the <style> tag is an awful solution. It completely changes the SVG.