You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of expo project, both dependencies could be absent: @react-native/metro-babel-transformer and metro-react-native-babel-transformer.
A fix would be to make reactNativeTransformer and expoTransformer functions, instead of self-executed functions.
Then when we require 'react-native-svg-transformer/expo', then it will not try to execute code of reactNativeTransformer, and so will not throw exception.
The text was updated successfully, but these errors were encountered:
alexander-at-t
changed the title
Failed to construct transformer: Error: Cannot find module 'metro-react-native-babel-transformer'
[Expo] Failed to construct transformer: Error: Cannot find module 'metro-react-native-babel-transformer'
Jan 31, 2025
The following code leads to an error in metro bundler in Expo project:
react-native-svg-transformer/index.js
Lines 9 to 15 in 02bdfc5
In case of expo project, both dependencies could be absent:
@react-native/metro-babel-transformer
andmetro-react-native-babel-transformer
.A fix would be to make
reactNativeTransformer
andexpoTransformer
functions, instead of self-executed functions.Then when we require 'react-native-svg-transformer/expo', then it will not try to execute code of
reactNativeTransformer
, and so will not throw exception.The text was updated successfully, but these errors were encountered: