Closed gvarandas closed 7 months ago
Can confirm this issue causes a failure on the latest set of React Native packages and this seems like a reasonable solution (have not tested).
Could this be merged now that RN 0.73 has officialy been released?
In the meantime here's a patch you can apply using patch-package: react-native-svg-transformer+1.1.0.patch
Oh, I wasn't aware of this. Thanks for contributing the fix!
The
metro-react-native-babel-transformer
package has been recently migrated to the React Native monorepo and published/required under the@react-native/metro-babel-transformer
alias.Starting with
react-native@0.73.0
, the new package is loaded by default, which makes the current implementation break when starting the metro bundler.To solve this, a simple
try/catch
block that loads the new package and fallbacks to the previous one in case it doesn't exist should suffice.