ios error when using bun isolated installs
"nativewind": "^5.0.0-preview.2", "react-native-css": "^3.0.1",
Describe the bug [runtime not ready]: RangeError: Maximum call stack size exceeded (native stack depth) ERROR [runtime not ready]: Error: Non-js exception: AppRegistryBinding::startSurface failed. Global was not installed. i am getting this error when using bun isolated installs
Reproduction https://stackblitz.com/edit/nativewind-test-svfprxsx?file=.npmrc
Additional context
@Alvi24 can you help me understand the purpose behind using Bun isolated installs? Your repro is using stackblitz and I believe our stackblitz only covers v4.1 of Nativewind so I can't be sure your project configuration is correct unless you create a repro via npx rn-new@next --nativewind --expo-router
here is a reproductions link: https://github.com/Alvi24/nativewind-fix
@Alvi24 this repo is called "nativewind-fix", does this mean you have resolved your issue and your repro shows how you've done so?
No i haven't resolved the problem, the word "fix" is that "it needs a fix"
same issue here
I'm also getting this error, here are some commonalities with your setup:
- same exact nativewind / react-native-css versions
- also running a monorepo setup with yarn workspaces
- I'm getting the error on android, I guess as a runtime error this is more likely..
- disabling the globalClassNamePolyfill from react-native-css removes the call stack size error, but introduces others.
My suspicion is that the react-native-css native metro resolution overrides are causing an infinite loop in certain hoisted package scenarios (with Dimensions in this case):
https://github.com/nativewind/react-native-css/blob/008d479253365745acedef5a9602a7382f991597/src/components/index.cts#L146
Ok after some more trial and error I have found that installing nativewind, react-native-css at the top level package.json ONLY will get you a working app.