I have the same issue with react-native-svg-transformer.
I followed the official installation's guide https://www.npmjs.com/package/react-native-svg-transformer. It works fine on browser but when build on Android emulator i got the exact error.
this is the package.json with interested packages:
"dependencies": {
...
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
"@svgr/plugin-svgo": "^8.1.0",
"expo": "~52.0.20",
"path-dirname": "^1.0.2",
"react": "18.3.1",
"react-native": "0.76.5",
"react-native-svg": "15.8.0"
},
"devDependencies": {
...
"@babel/core": "^7.25.2",
"react-native-svg-transformer": "^1.5.0",
},