From d61ec74b4cd8f5c9ee6f01d7804be83d997d7f98 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 3 Aug 2026 19:10:15 -0700 Subject: [PATCH 1/2] fix(docker): upgrade bun to 1.3.14 to unbreak the Next 16.3.0 server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bun 1.3.13 cannot load Next 16.3.0's compiled server runtime. The app container runs the Next server under Bun (`oven/bun:1.3.13-slim`, `bun apps/sim/bootstrap.js`), so every app-page render threw and `/api/health` returned 500: ⨯ Error: Failed to load external module next/dist/compiled/next-server/app-page-turbo.runtime.prod.js: TypeError: Expected CommonJS module to have a function wrapper. If you weren't messing around with Bun's internals, this is a bug in Bun Isolated to Bun, not Next, by loading that exact module in the real images: Next 16.2.12 + Bun 1.3.13 -> loads (why staging was fine before) Next 16.3.0 + Bun 1.3.13 -> CJS wrapper error Next 16.3.0 + Bun 1.3.14 -> loads Bun 1.3.14 is the current stable and already fixes it, so this bumps every pin rather than reverting the framework upgrade, which would only defer the same latent Bun bug to the next attempt. Why no gate caught it: local dev machines and this bump's own verification run Bun 1.3.14, while the container and CI pinned 1.3.13 — and CI only *builds* the image, it never boots one and probes `/api/health`. A container smoke test in CI would have caught this before merge; that is worth adding separately. --- .github/workflows/ci.yml | 4 ++-- .github/workflows/desktop-e2e.yml | 4 ++-- .github/workflows/desktop-release.yml | 2 +- .github/workflows/docs-embeddings.yml | 2 +- .github/workflows/helm.yml | 2 +- .github/workflows/migrations.yml | 2 +- .github/workflows/publish-cli.yml | 2 +- .github/workflows/publish-ts-sdk.yml | 2 +- .github/workflows/test-build.yml | 4 ++-- docker/app.Dockerfile | 2 +- docker/db.Dockerfile | 2 +- docker/realtime.Dockerfile | 2 +- package.json | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42faa142a79..227fda6e1fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,7 +226,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Cache Bun dependencies uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 @@ -652,7 +652,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Install dependencies run: bun install --frozen-lockfile --ignore-scripts diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index 5a305244d17..4feb7b91318 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -30,7 +30,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Install dependencies run: bun install --frozen-lockfile @@ -66,7 +66,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@v4 diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml index f0f512b5268..d8a9e650d89 100644 --- a/.github/workflows/desktop-release.yml +++ b/.github/workflows/desktop-release.yml @@ -57,7 +57,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@v4 diff --git a/.github/workflows/docs-embeddings.yml b/.github/workflows/docs-embeddings.yml index a8d882c4a57..969f47f4b9f 100644 --- a/.github/workflows/docs-embeddings.yml +++ b/.github/workflows/docs-embeddings.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index ea9ac3f5221..05e2ee8a12b 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 # Docker Compose and Kubernetes must run the same background jobs on the # same schedules; this fails the build if the two drift apart. The script diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml index c91b9c300ce..c23a39a9258 100644 --- a/.github/workflows/migrations.yml +++ b/.github/workflows/migrations.yml @@ -34,7 +34,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Cache Bun dependencies uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index 0bc5fadd5c8..9513018c125 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node.js for npm publishing uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/.github/workflows/publish-ts-sdk.yml b/.github/workflows/publish-ts-sdk.yml index 65b5e02411f..c643c6ea5d8 100644 --- a/.github/workflows/publish-ts-sdk.yml +++ b/.github/workflows/publish-ts-sdk.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node.js for npm publishing uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index c072d19f149..4b5a0fb1404 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 @@ -251,7 +251,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/docker/app.Dockerfile b/docker/app.Dockerfile index c580bcd02e9..484086774fa 100644 --- a/docker/app.Dockerfile +++ b/docker/app.Dockerfile @@ -1,7 +1,7 @@ # ======================================== # Base Stage: Debian-based Bun with Node.js 24 # ======================================== -FROM oven/bun:1.3.13-slim AS base +FROM oven/bun:1.3.14-slim AS base # Install Node.js 24 (Active LTS) and common dependencies once in base stage. # Node runs only the isolated-vm sandbox worker (the app itself runs under Bun); diff --git a/docker/db.Dockerfile b/docker/db.Dockerfile index 728083a3aef..5ca6cb831e5 100644 --- a/docker/db.Dockerfile +++ b/docker/db.Dockerfile @@ -1,7 +1,7 @@ # ======================================== # Base Stage: Alpine Linux with Bun # ======================================== -FROM oven/bun:1.3.13-alpine AS base +FROM oven/bun:1.3.14-alpine AS base # ======================================== # Dependencies Stage: Install Dependencies diff --git a/docker/realtime.Dockerfile b/docker/realtime.Dockerfile index d403c906462..c87f14b8a47 100644 --- a/docker/realtime.Dockerfile +++ b/docker/realtime.Dockerfile @@ -1,7 +1,7 @@ # ======================================== # Base Stage: Alpine Linux with Bun # ======================================== -FROM oven/bun:1.3.13-alpine AS base +FROM oven/bun:1.3.14-alpine AS base RUN apk add --no-cache libc6-compat curl diff --git a/package.json b/package.json index 66fb8fd840f..888d925fd52 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simstudio", - "packageManager": "bun@1.3.13", + "packageManager": "bun@1.3.14", "version": "0.0.0", "private": true, "license": "Apache-2.0", From 454b8a3f552a1a23f3978b4189ba46eabcb62a10 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 3 Aug 2026 19:22:22 -0700 Subject: [PATCH 2/2] fix(docker): align the remaining bun pins with 1.3.14 Two pins were missed in the first pass because the search was scoped to docker/, package.json and .github/workflows/: - .devcontainer/Dockerfile still built on oven/bun:1.3.13-alpine - PI_BUN_VERSION in apps/sim/scripts/pi-sandbox-packages.ts was still 1.3.13, despite being documented as mirroring the root packageManager field, so Pi sandbox images would have kept installing the Bun release that cannot load the Next 16.3.0 server runtime. Fixed surgically rather than with a repo-wide replace: "1.3.13" also appears inside SVG path data in apps/sim/components/icons.tsx and apps/docs/components/icons.tsx, which a blind sed would have corrupted. --- .devcontainer/Dockerfile | 2 +- apps/sim/scripts/pi-sandbox-packages.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 201719f0f00..8d14cd98508 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM oven/bun:1.3.13-alpine +FROM oven/bun:1.3.14-alpine # Install necessary packages for development RUN apk add --no-cache \ diff --git a/apps/sim/scripts/pi-sandbox-packages.ts b/apps/sim/scripts/pi-sandbox-packages.ts index 59d7c29632d..a6646201ccd 100644 --- a/apps/sim/scripts/pi-sandbox-packages.ts +++ b/apps/sim/scripts/pi-sandbox-packages.ts @@ -14,7 +14,7 @@ */ /** Bun version mirrored from the root packageManager field. */ -export const PI_BUN_VERSION = '1.3.13' +export const PI_BUN_VERSION = '1.3.14' /** Exact global package versions mirrored from package.json and bun.lock. */ export const PI_GLOBAL_NPM_PACKAGES = [