[No QA] fix: run rsbuild dev server with Node instead of Bun - #96023
Conversation
Bun's node:http2 implementation throws when http-proxy-middleware reads req.socket.server on the HTTPS dev server, crashing npm run web for devs with USE_WEB_PROXY enabled. Co-authored-by: Cursor <cursoragent@cursor.com>
|
npm has a |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.4.34-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.34-14 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.34-14 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Reverts the
web-serverscript to run Rsbuild's dev server under Node instead of Bun. PR #95890 switched it to Bun, but Bun'snode:http2implementation throws whenhttp-proxy-middlewarereadsreq.socket?.serveron the HTTPS dev server (used whenserver.httpsandserver.proxyare both enabled). That crashesnpm run webfor devs with the web proxy enabled (the default whenUSE_WEB_PROXYis not set tofalse).Bun remains in use for
web-proxy, production/staging/adhoc builds, and other scripts — only the long-running Rsbuild dev server moves back to Node.Fixed Issues
$
PROPOSAL:
Tests
USE_WEB_PROXYis not set tofalsein.env(or unset it).npm run web-proxyin one terminal and confirm it listens on port 9000.npm run web-serverin another terminal and wait forready built.https://dev.new.expensify.com:8082/and confirm the app loads./api/calls returning 200).Offline tests
N/A — dev-server startup tooling only; no app runtime or offline behavior changes.
QA Steps
N/A — [No QA] tooling change; no app-facing behavior change.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
N/A — no UI change.