I’m working on an Expo app inside a monorepo.
Setup
- Expo Router app
- Monorepo (pnpm workspace)
- Shared UI package: ui-native
- gluestack-ui is installed and initialized inside ui-native
App imports gluestack components from ui-native.
The app crashes immediately on launch only when I use < Stack /> in my root layout.
[CoreFoundation] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTView setColor:]: unrecognized selector sent to instance 0x11fb633f0'
*** First throw call stack:
(
0 CoreFoundation 0x00000001804c9690 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00000001800937cc objc_exception_throw + 72
2 CoreFoundation 0x00000001804deea4 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 UIKitCore 0x0000000185c8acb4 -[UIResponder doesNotRecognizeSelector:] + 232
4 CoreFoundation 0x00000001804cd8e8 ___forwarding___ + 1216
5 CoreFoundation 0x00000001804cfe2c _CF_forwarding_prep_0 + 92
6 React 0x000000010caaa438 __49-[RCTComponentData createPropBlock:isShadowView:]_block_invoke.40 + 396
7 React 0x000000010caaaa00 __49-[RCTComponentData createPropBlock:isShadowView:]_bl<…>
If I remove < Stack> and its children and render any simple component (even a View or a Gluestack Button), the app works perfectly.
As soon as is added back, the app crashes on startup.
What I’ve tried
- Deleted node_modules
- Deleted ios folder
- Reinstalled dependencies
- Rebuilt app
- Verified gluestack works when used without