react-native-reanimated: [3.4] Fails to build in expo eas

Description

Following error is logged during build

❌  (node_modules/expo-dev-launcher/ios/EXRCTAppDelegateInterceptor.mm:63:15)

  61 | {
  62 | #if __has_include(<RNReanimated/REAInitializer.h>) && !RCT_NEW_ARCH_ENABLED
> 63 |   reanimated::REAInitializer(bridge);
     |               ^ no type named 'REAInitializer' in namespace 'reanimated'
  64 | #endif // __has_inclide(<RNReanimated/REAInitializer.h>) && !RCT_NEW_ARCH_ENABLED
  65 | 
  66 |   return [super jsExecutorFactoryForBridge:bridge];

Steps to reproduce

Build project on 3.4 in expo’s eas. Issue is fixed by reverting back to 3.3.x version

Snack or a link to a repository

https://github.com/expo/expo

Reanimated version

3.4.0

React Native version

0.72.1

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Fabric (New Architecture)

Build type

Release mode

Device

None

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 8
  • Comments: 21 (3 by maintainers)

Most upvoted comments

problem is occuring with expo-dev-client 2.4.8

@thefranfran For some reason expo-dev-client still has 2.4.7 (which includes the fix) tagged as next version. To fix it install version 2.4.7 explicitly.

"expo-dev-client": "3.1.0",

Fixed it for me. I didn’t want to add expo-dev-launcher, so just tried bumping the expo-dev-client to the “next” version…

Same here

I have prepared PR to expo to fix this issue - https://github.com/expo/expo/pull/23726. Patch should be available in the newest version of expo-dev-client.

sadly it keeps happening in expo-dev-client": "~2.4.8", (for the moment) I reverted to version ~3.3.0 of reanimated

the fix is not published yet guys, when he says newest i assumed it meant the next released version. 2.4.8 is 9 days old so i don’t think it’s in when he poste 2 hours ago.

most likely be in 2.4.9

"expo-dev-client": "3.1.0",

Fixed it for me. I didn’t want to add expo-dev-launcher, so just tried bumping the expo-dev-client to the “next” version…

This work for me. Thanks! (expo-dev-launcher not needed to be installed)

Maybe; My confusing is from

@lukmccall lukmccall merged commit e4df60a into expo:main on Jul 26

from: https://github.com/expo/expo/pull/23726

Which is older than the expo-dev-client@2.4.8 release and when you click the pr you see it have the “published” label implying that the changes should be on npmjs (guess that includes @next 😄).

Anywho feel this belong to an expo issue and not react-native-reanimated.

So I made a simple test.

  • create a folder “package-test” + cd into it
  • npm install a@npm:expo-dev-launcher@2.4.9
  • npm install b@npm:expo-dev-launcher@2.4.10
  • git diff node_modules/{a,b}/ios/EXRCTAppDelegateInterceptor.mm
diff --git a/node_modules/a/ios/EXRCTAppDelegateInterceptor.mm b/node_modules/b/ios/EXRCTAppDelegateInterceptor.mm
index 7776439..d9d8c89 100644
--- a/node_modules/a/ios/EXRCTAppDelegateInterceptor.mm
+++ b/node_modules/b/ios/EXRCTAppDelegateInterceptor.mm
@@ -59,12 +59,9 @@

 - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
 {
-#if __has_include(<RNReanimated/REAInitializer.h>) \
-  && __has_include(<RNReanimated/UIResponder+Reanimated.h>) /* removed in react-native-reanimated@3.4.0 */ \
-  && !RCT_NEW_ARCH_ENABLED
-  // required and available only for react-native-reanimated < 3.4.0
+#if __has_include(<RNReanimated/REAInitializer.h>) && !RCT_NEW_ARCH_ENABLED
   reanimated::REAInitializer(bridge);
-#endif
+#endif // __has_inclide(<RNReanimated/REAInitializer.h>) && !RCT_NEW_ARCH_ENABLED

   return [super jsExecutorFactoryForBridge:bridge];
 }

Went back to my project with expo-dev-client": "2.4.8" mutated node_modules/expo-dev-launcher/ios/EXRCTAppDelegateInterceptor.mm with code from @2.4.9 and it works.

So I assume its a regression in expo-dev-launcher@{2.4.9=>2.4.10}.

One could add a patch or just downgrade to expo-dev-client": "2.4.7" where expo-dev-launcher@2.4.9 is a transitive dependency.

Would expect a expo-dev-client": "2.4.9" with a fix.

I don’t know enough about the project or Objective-c to know if I’m missing something.

I fixed this by adding "expo-dev-launcher": "^3.0.0" in my Package.json