`babel-plugin-module-resolver` with Expo SDK 43/44 not working?

I had set up babel-plugin-module-resolver in my project some time ago, which was working fine. Recently, I was updating it from SDK 42 to SDK 43. However, after this update I get an issue when running the app in the simulator:

Unable to resolve module navigation/RootNavigator from ~/Developer/project/App.js: navigation/RootNavigator could not be found within the project or in these directories:

Nothing else was changed, and as far as I can see the babel-plugin-module-resolver setup is still correct.

Is anyone else having problems with this as well? Or is babel-plugin-module-resolver working correctly in your projects with SDK 43 (or 44)?

As I haven’t changed anything else, I suspect the issue is related with the update of babel-preset-expo (as part of the update to SDK 43).

After some additional testing, the issue seems to occur with the update from babel-preset-expo from version 8.4.1 to version 8.5.0. Reverting to version 8.4.1 makes the imports work again.

Thanks for following up with your findings @jnthn! If you have time and could make a github issue with a minimal repro showcasing this error that would be greatly appreciated.


Issue reported: [babel-preset-expo] v8.5.0 breaks `babel-plugin-module-resolver` when using JSON Babel config · Issue #16879 · expo/expo · GitHub

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.