I am currently developing a React Native application using AWS Amplify and Expo, and I’ve run into a persistent issue in React Native + Expo SDK 50. The following TypeError is thrown when I attempt to run the application:
2024-05-09T15:17:24.861Z [WARNING]: [15:17:24] TypeError: /codebuild/output/src3477756040/src/ennma_app/node_modules/expo-router/_ctx.web.js: Expected `fromDir` to be of type `string`, got `undefined`
at transformFile.next (<anonymous>)
at run.next (<anonymous>)
at transform.next (<anonymous>)
2024-05-09T15:17:24.963Z [ERROR]: !!! Build failed
2024-05-09T15:17:24.963Z [ERROR]: !!! Error: Command failed with exit code 1
Environment
- AWS Amplify
- React Native
- Expo SDK 50
Relevant package.json entries:
{
"dependencies": {
"expo": "~51.0.0",
"expo-router": "~3.5.10",
...
}
}
I have already tried the following info without success
expo sdk 40 metro.config.js “Expected ‘fromDir’ to be ‘string’, got ‘undefined’ “
https://github.com/kristerkari/react-native-svg-transformer/issues/329
The error persists, and it seems to be related to how expo-router handles directory paths post-SDK update. Has anyone encountered a similar issue, or does anyone have insights on how to resolve this fromDir TypeError?
toyofumi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.