iOS Bundling failed 523ms
error: node_modules/expo-router/_ctx.ios.tsx: node_modules/expo-router/_ctx.ios.tsx:Invalid call at line 6: // @ts-expect-error
process.env.EXPO_ROUTER_IMPORT_MODE_IOS
Fourth argument of require.context should be an optional string "mode" denoting how the modules will be resolved.
If you're on expo SDK 50 and using expo-router v3 you should NOT include expo-router/babel in babel.config. If you're using tamagui with expo router v3 both on SDK 50 you should remove the transform-inline-environment-variables from babel.config as its messing with the EXPO_ROUTER_APP_ROOT ENV.
Other workarround is to manually set the APP_ROOT var on top of your babel.config with
process.env.EXPO_ROUTER_APP_ROOT = '../../src/app';
reference:
https://github.com/expo/router/issues/41
https://github.com/tamagui/tamagui/issues/2044
Managed to resolve this issue by adding expo-router/babel to plugins in the project babel config. I also needed to make a new EAS dev client build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With