Skip to content

ios error when using bun isolated installs #256

Closed

Description

@Alvi24

"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

Image

Activity

  1. danstepanov commented on Oct 13, 2025

    @danstepanov
    Member

    @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

  2. Alvi24 commented on Oct 13, 2025

    @Alvi24
    Author

    here is a reproductions link: https://github.com/Alvi24/nativewind-fix

  3. danstepanov commented on Oct 15, 2025

    @danstepanov
    Member

    @Alvi24 this repo is called "nativewind-fix", does this mean you have resolved your issue and your repro shows how you've done so?

  4. Alvi24 commented on Oct 15, 2025

    @Alvi24
    Author

    No i haven't resolved the problem, the word "fix" is that "it needs a fix"

  5. Mnigos commented on Oct 28, 2025

    @Mnigos

    same issue here

  6. huwcarwyn commented on Dec 12, 2025

    @huwcarwyn
    Contributor

    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):

    get Dimensions() {

  7. huwcarwyn commented on Dec 13, 2025

    @huwcarwyn
    Contributor

    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.

  8. TheMichio commented on Dec 24, 2025

    @TheMichio

    Hi 👋
    @huwcarwyn @Mnigos @Alvi24 @danstepanov

    if you're using bun, please add this to your bunfig.toml, it will resolve the issue:

    [install]
    linker = "hoisted"
    
  9. Alvi24 commented on Mar 27, 2026

    @Alvi24
    Author

    Hi 👋 @huwcarwyn @Mnigos @Alvi24 @danstepanov

    if you're using bun, please add this to your bunfig.toml, it will resolve the issue:

    [install]
    linker = "hoisted"
    

    so there isn't a way i can use bun isolated installs with natviewind v5?

  10. danstepanov commented on Apr 15, 2026

    @danstepanov
    Member

    Resolved via bunfig.toml configuration as described in the comments. Closing as community-solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions