You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6ac9a2d
Browse filesBrowse the repository at this point in the historyBrowse files
Add `bun-1.3` and `bun-1.4` as runtime options, mapped to the published
`triggerdotdev/bun:1.3-bookworm` and `1.4-bookworm` images (Bun 1.3.14 and
1.4.2). Bun 1.3.x aborts any fetch that receives no bytes for 300s, which
fails long non-streaming calls; Bun 1.4 does not have that limit.
Plain `bun` is unchanged and still resolves to the 1.3-node20 image. The
versioned images have no node binary, so their final stage starts the app
with `dumb-init bun`. The supervisor pins uid 1001 for every bun runtime.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XW9yYwuPcYpqPr1zX5pk2W
Add `bun-1.3` (Bun 1.3.14) and `bun-1.4` (Bun 1.4.2) as `runtime` options in `trigger.config.ts`. Bun 1.3.x aborts any `fetch` that receives no bytes for 300 seconds, which fails long non-streaming calls such as LLM requests. Bun 1.4 does not have this limit, so set `runtime: "bun-1.4"` for those tasks. `runtime: "bun"` is unchanged and still deploys on Bun 1.3.3.
Copy file name to clipboardExpand all lines: docs/guides/frameworks/bun.mdx
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,17 @@ import CliViewRunStep from "/snippets/step-view-run.mdx";
15
15
</Warning>
16
16
17
17
<Note>
18
-
**Supported Bun version:** Deployed tasks run on Bun 1.3.3. For local development, use Bun 1.3.x
19
-
for compatibility.
18
+
**Supported Bun version:** With `runtime: "bun"`, deployed tasks run on Bun 1.3.3. To deploy on a
19
+
newer release, set `runtime: "bun-1.4"` (Bun 1.4.2) or `runtime: "bun-1.3"` (Bun 1.3.14), see
20
+
[Bun versions](/config/config-file#bun-versions). For local development, use the same Bun release
21
+
line as your deployed runtime.
20
22
</Note>
21
23
22
24
<Prerequisitesframework="Bun" />
23
25
24
26
## Known issues
25
27
28
+
- On Bun 1.3.x (`runtime: "bun"` and `"bun-1.3"`), `fetch` aborts any request that receives no bytes for 300 seconds with `TimeoutError: The operation timed out.`, so a long, non-streaming call such as an LLM request fails at exactly 5 minutes. **Workaround:** set `runtime: "bun-1.4"` in `trigger.config.ts`, which does not have this limit.
26
29
- Certain OpenTelemetry instrumentation will not work with Bun, because Bun does not support Node's `register` hook. This means that some libraries that rely on this hook will not work with Bun.
27
30
- If Bun is installed via Homebrew (e.g. `/opt/homebrew/bin/bun`), you may see an `ENOENT: spawn /Users/<you>/.bun/bin/bun` error because the CLI expects Bun at the default install path. **Workaround:** create a symlink:
Entries are comma-separated `runtime=image@sha256:<digest>`. The runtimes are `node-22`, `node-24`, `node-26`and `bun`, and every image must be pinned by digest. An invalid value prevents the webapp from starting. Projects with `runtime: "node"` in their config resolve to the current default Node runtime (`node-24` today), so set that key for them. With the Helm chart, set the variables through `webapp.extraEnvVars`.
111
+
Entries are comma-separated `runtime=image@sha256:<digest>`. The runtimes are `node-22`, `node-24`, `node-26`, `bun`, `bun-1.3`and `bun-1.4`, and every image must be pinned by digest. An invalid value prevents the webapp from starting. Projects with `runtime: "node"` in their config resolve to the current default Node runtime (`node-24` today), so set that key for them. With the Helm chart, set the variables through `webapp.extraEnvVars`.
112
112
113
113
Runtimes with an entry build on that image; the others keep the published images. Deploys from CLI versions that cannot apply the images are rejected with an error asking to upgrade, and so are `--native-build`, `--local-bundle` and `--from-bundle` deploys. This is a self-hosting setting and does not apply to Trigger.dev Cloud.
114
114
115
115
You own a custom base image. It must provide:
116
116
117
-
-`node` on `PATH` at the runtime's major version (for `bun`, both `bun` and `node`, because the final stage starts the app with `dumb-init node`)
117
+
-`node` on `PATH` at the runtime's major version (for `bun`, both `bun` and `node`, because the final stage starts the app with `dumb-init node`; for `bun-1.3` and `bun-1.4`, only `bun`, because the final stage starts the app with `dumb-init bun`)
118
118
-`busybox`, `ca-certificates`, `dumb-init`, `git` and `openssl`
119
-
- a `node` user (a `bun` user for the Bun runtime)
119
+
- a `node` user (a `bun` user for the Bun runtimes)
120
120
- glibc, so native modules built in the build stage load at runtime
121
121
122
122
A `DEPLOY_BUILD_BASE_IMAGES` image needs everything the base image provides, plus `python3`, `make` and `g++`. Build extensions that add image instructions are replayed on it. Without an entry, the build stage uses the published build image, except for projects whose build extensions add image instructions: those build from your base image and install the toolchain with `apt-get`, so that base must be Debian-based. To avoid the published images entirely, set both variables.
Copy file name to clipboardExpand all lines: docs/snippets/node-versions.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,16 @@ Trigger.dev runs your deployed tasks on one of these runtimes:
5
5
- Node.js `node-24` — `24.18.0`
6
6
- Node.js `node-26` — `26.4.0`
7
7
- Bun `bun` — `1.3.3`
8
+
- Bun `bun-1.3` — `1.3.14`
9
+
- Bun `bun-1.4` — `1.4.2`
8
10
9
11
If you don't set a `runtime`, or you set `runtime: "node"`, your tasks run on the current Node.js LTS. That version moves forward as new LTS releases land, so set an explicit version — for example `runtime: "node-24"` — if you need it to stay fixed.
`The "bun" runtime is currently experimental, and certain features may not work, especially opentelemetry instrumentation of 3rd party packages.`
374
+
`The "${config.runtime}" runtime is currently experimental, and certain features may not work, especially opentelemetry instrumentation of 3rd party packages.`
0 commit comments