Skip to content

Windows: raea play fails to bundle ("Could not resolve \\?\...\bevy-react\src\bridge.ts") although the file exists #78

Closed

Description

@JoacoRea

Summary

On Windows, raea play always fails at the bundling step with a "Could not resolve" error for the SDK's own bridge.ts, even though that file exists at the exact path in the message. It fails even on a brand new project created with raea init and an untouched template edit.tsx. raea render works.

Environment

  • raea 0.1.0-canary.2 (installed with irm https://raea.io/install.ps1 | iex; reinstalling gave the same version and the same error)
  • Windows 11 25H2
  • GPU: AMD Radeon RX 6900 XT (wgpu initializes Vulkan fine: "Found 3 cooperative matrix configurations supported by wgpu")
  • Agent: Claude Code Desktop (the 3D game I originally tried was generated by Claude Code using the raea skills)

Steps to reproduce

  1. mkdir C:\raeatest2; cd C:\raeatest2
  2. raea init (creates edit.tsx, cuts.ts, styles.gen.ts, AGENTS.md)
  3. raea play edit.tsx without touching anything

This also fails with a 3D game written by Claude Code (raea play edit.tsx --3d, with raea scene lint reporting 24 parts, 0 errors, 0 warnings), so it does not depend on the project contents.

Actual result

REFUSED couldn't bundle edit.tsx: Could not resolve '\\?\C:\Users\User\.raea\share\raea\sdk\react\js\node_modules\bevy-react\src\bridge.ts' in ../Users/User/AppData/Local/Temp/raea-cli-XXXXX/entry.tsx

The same error happens with --3d, --baked and --offscreen. The perf JSON that follows is all zeros (the session never starts).

Expected result

The project bundles and opens in a window.

What I checked

  • The file exists: ...\node_modules\bevy-react\src\bridge.ts (33613 bytes), next to the rest of the sources and package.json, so the install looks complete.
  • node_modules\bevy-react is a regular directory, not a symlink or junction (LinkType and Target are empty).
  • Moving the project from C:\Claude Code\raea test to C:\raeatest (no spaces in the path) did not change anything.
  • Reinstalling raea did not change anything.
  • A fresh raea init project with the unmodified template fails the same way.
  • raea render edit.tsx works on the original game project and produced stills.
  • raea traces show last says "ok", 0 frames, 0 errors (the session never started).

Guess (not confirmed)

The path is passed to the bundler with the Windows verbatim prefix \\?\, and the resolver does not handle it. render may load the SDK through a different path.

Happy to test a fix or run more diagnostics.

Activity

  1. JoacoRea commented on Nov 9, 2026

    @JoacoRea
    Author

    Update: found a workaround and the likely root cause (investigated with Claude Code).

    Two chained failures, both Windows-only and both only on the "lite" path that raea play uses (raea render --lite fails the same way; normal raea render is unaffected):

    1. Verbatim path prefix. play generates a temporary entry.tsx that imports bridge.ts by absolute path. Without RAEA_HOME, raea locates its SDK by canonicalizing the executable path, which on Windows returns the \\?\C:\... form. The bundler can't resolve that specifier (unconfirmed guess: it treats the ? as the start of a query string). With RAEA_HOME set, the path comes out as a normal C:\... and the bundle succeeds.

    2. React alias ignored. After fixing (1), it fails with bundle.js: Error: not a function. The temporary tsconfig.json maps react to raea's lite runtime, but on Windows that mapping seems to be ignored and react resolves to the real React in node_modules, which lacks the functions the entry expects (__h, renderRoot). Cause not investigated.

    Workaround used: a copy of the SDK (share/raea -> share/raea-play) where node_modules/react is a shim re-exporting the lite runtime, plus a wrapper that sets RAEA_HOME to that copy and calls raea play. With it, play runs offscreen and windowed on Windows 11 25H2 / RX 6900 XT without errors. Keyboard input and audio not yet verified.

    Limits: plain raea play still fails; the copy goes stale after updating raea.

  2. shinyobjectz commented on Nov 10, 2026

    @shinyobjectz
    Owner

    Thanks for the thorough report and for tracking down both causes. Both are fixed on main, after canary.2 was built:

    1. The verbatim prefix: raea finds its SDK by canonicalizing its own path, and that now drops the \\?\ prefix before anything is bundled (5e1c192, raea_io_home::plain).
    2. The React alias: the edit's resolver compared the importer's path as written against the work folder's canonical path. Those differ on Windows (TEMP's 8.3 short name), so no file counted as the edit's own and react resolved to the engine's CommonJS copy, hence not a function (__h). The importer is now canonicalized the same way (bcfdb9e).

    I checked it on a Windows 11 PC (RTX 4070) with the Windows zip from v0.1.0's release run, unpacked, with no RAEA_HOME: a fresh raea init, then raea play edit.tsx --offscreen ... plays and writes its snapshot, and raea render edit.tsx --lite works too.

    The catch is that no Windows build with these fixes is published yet. v0.1.0 shipped macOS and Linux only, because the Windows job's live-play check timed out. That turned out to be a real bug, not the runner: on Windows, with any GPU, raea play could hang at start-up while its first frame waited for shaders Bevy was compiling in the background. That's fixed on main too (fa78ed3: pipelines now compile on the render thread, as they always have on macOS), and the release's live-play cases pass on that PC, on its GPU and on software Vulkan.

    I'll leave this open until a release ships a Windows zip, so you can confirm on your machine. Then your RAEA_HOME/shim workaround can go.

  3. shinyobjectz commented on Nov 10, 2026

    @shinyobjectz
    Owner

    A Windows build with both fixes is up: v0.1.1-rc1, a pre-release. Unpack raea-0.1.1-rc1-windows-x86_64.zip anywhere, with no RAEA_HOME set, and raea init then raea play edit.tsx should work, from a folder with spaces in its name too. (raea.io's install.ps1 installs it too, but at the moment it ends with a red Select-String error after everything is installed. That's fixed and goes out with the next site update; the zip avoids it.)

    On a Windows 11 PC (RTX 4070), that zip, in a fresh user profile with no bun, ran init, render (a frame and an MP4), play and a BevyApp program with no failures, including from a long folder with spaces.

    Could you try it and say here whether it works for you? I'll close this once it does, and your RAEA_HOME/shim workaround can go.

  4. JoacoRea commented on Nov 10, 2026

    @JoacoRea
    Author

    Confirmed fixed with v0.1.1-rc2 (raea-0.1.1-rc2-windows-x86_64.zip). No RAEA_HOME set, Windows 11 25H2, AMD RX 6900 XT.

    • raea init + raea play edit.tsx from a folder with spaces and parentheses ("D:\meme\Descargas (D)\raea"): works. Ran 24 s, ~59.4 fps presented, 0 missed vs display, "error": null.
    • My 3D game with raea play edit.tsx --3d: works, renders correctly.
    • Keyboard (WASD) and kick (Space): work.
    • Sound: works (kick, bounces, goal).

    Thanks for the quick fix. My RAEA_HOME/shim workaround is no longer needed.

  5. shinyobjectz commented on Nov 12, 2026

    @shinyobjectz
    Owner

    Closing on your confirmation with v0.1.1-rc2; the fix is in v0.1.1, which is out now. Thanks again for the report and the testing.

  6. added a commit that references this issue on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions