Changing to EAS build - custom development client

Hello everyone,
So I have had a expo managed app for the last couple of months and decided now to go over to custom development client for more flexibility and usage of native libraries.

All my dependencies:

I followed some tutorials/instructions to go through with this but have been stuck for over a day with some errors. I believe caused by react-native-reanimated when using @react-navigation/drawer.

When I run the app through expo start --dev-client I keep getting the error:

> ERROR  TypeError: null is not an object (evaluating '_ReanimatedModule.default.createNode')
>  LOG  Running "main" with {"rootTag":331}
>  ERROR  Invariant Violation: "main" has not been registered.

and when I try to build it through eas it keeps failing the build and giving bunch of errors e.g:

Hi @rewardy

How are you importing reanimated?

Hey @wodin
I tried following the package instructions included it in the babel config as plugin, and tried importing it on top of app.js also tried index.js but started getting another error. So I tried to correctly set it up in the Android files, build gradle enabling hermes to true and importing the reanimated stuff in MainApplication.java this.

For now I removed the drawer navigation and everything is working as expected but, I need to re-add it eventually, not sure how to fix this issue.

I am wondering when I am using custom expo development client do I follow the expo guide or react native bare when installing packages? (that supports expo ofc) for example the reanimated package.

If you have ios and/or android directories in the root of your project (as opposed to somewhere under node_modules) then your app is using the bare workflow. It’s possible that you intended to use the managed workflow, but you ran something like expo run:android. This has a side effect of basically ejecting your app to the bare workflow. As long as you have not made any changes under android/ios that you need to keep, you can switch back to the managed workflow by removing those directories. There are a few other changes made when ejecting an app, but they are less important to revert.

You can build a custom dev client for a managed workflow app or a plain react native/bare workflow app. If you have android/ios directories you should either switch back to the managed workflow and then use the managed workflow instructions, or you should use the bare workflow instructions.