Skip to content

Pin @sentry/nextjs to 11.10.0: from 11.13.0 its bun entry breaks the webapp image on Bun #807

Open

Description

@HMarzban

Summary

The production deploy of 3468060ca (run 44990744505) failed at the webapp step. The new webapp containers logged Cannot find module '@sentry/nextjs' and never became healthy. The deploy guard kept the old replicas serving, and the rollback put every app service back on 6da3a609e. Users saw no error.

Cause

  • The dependency sweep 804fc4aa0 moved @sentry/nextjs from ^11.10.0 to ^11.14.0 in apps/webapp and apps/admin-dashboard.
  • From 11.13.0, @sentry/nextjs has a bun export condition (./build/cjs/index.bun.js), listed before node. 11.10.0 to 11.12.0 do not have it. 11.15.0 and 11.16.0 still do.
  • The webapp image runs Next output: 'standalone' on oven/bun:1-slim. Bun picks the bun entry. Next's file tracing copied only build/cjs/index.server.js, so index.bun.js is not in the image and the require fails.
  • index.bun.js also requires @sentry/bun, an optional peer that the webapp does not list. So a tracing include would not be enough.
  • Build Verification passed, because it does not boot the image on Bun.

Checked in the failed container (read-only): node_modules/@sentry/nextjs/build/cjs/index.server.js exists; build/esm/index.server.js and index.bun.js do not.

Fix

  • Pin "@sentry/nextjs": "11.10.0" (exact) in apps/webapp/package.json and apps/admin-dashboard/package.json. Production ran this version.
  • Update bun.lock in the same commit.
  • AGENTS.md: name the pin, and add a trap line: do not take @sentry/nextjs 11.13.0 or later until its bun entry is in the standalone image.
  • @sentry/bun stays at 11.14.0 in apps/hocuspocus.server. Its new containers were healthy.

Acceptance

  • Both manifests pin 11.10.0, and bun.lock resolves @sentry/nextjs to 11.10.0 only.
  • @sentry/bun stays 11.14.0.
  • AGENTS.md names the pin and the trap.
  • Both images boot locally on oven/bun:1-slim, and /api/health answers 200 (webapp port 3000, admin port 3100).
  • The next (build): front back deploy is green, and every app service serves the new commit.

Out of scope

  • A CI step that boots the built image before deploy.
  • Making a failed deploy remove its own new replicas. The 2 failed webapp containers were removed by hand on 2026-11-22.

An adviser review on 2026-11-22 cut both from this issue. Each can be a small separate issue.

Activity

  1. added this to the v2.3.7 milestone on Nov 22, 2026
  2. added
    bugSomething isn't working
    dependenciesPull requests that update a dependency file
    on Nov 22, 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

    DevOpsbugSomething isn't workingdependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions