Provide environment information
- trigger.dev SDK: v4.4.3
- Runtime: node-22
- Platform: Trigger.dev Cloud (api.trigger.dev)
Describe the bug
Managed runs fail during worker bootstrap with MissingManagedEnvFileError: Missing env file: env/local.public. The error occurs before trigger.config.ts loads — in trigger.dev's internal managed worker bootstrap (scripts/dev/env/trigger-config-bootstrap.ts).
Environment variables ARE configured in the dashboard for this project.
Stack trace
MissingManagedEnvFileError: Missing env file: env/local.public
at loadManagedEnvIntoProcess (file:///scripts/dev/env/process.ts:376:13)
at loadManagedEnvForTriggerConfig (file:///scripts/dev/env/trigger-config-bootstrap.ts:52:12)
at file:///trigger.config.ts:11:1
at ModuleJob.run (node:internal/modules/esm/module_job:274:25)
at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:644:26)
at importConfig (file:///.npm/_npx/d1873648c02c7df8/node_modules/trigger.dev/src/entryPoints/managed-run-worker.ts:149:24)
at file:///.npm/_npx/d1873648c02c7df8/node_modules/trigger.dev/src/entryPoints/managed-run-worker.ts:172:37
at _RunTimelineMetricsAPI.measureMetric (file:///.npm/_npx/d1873648c02c7df8/node_modules/@trigger.dev/core/src/v3/runTimelineMetrics/index.ts:67:22)
at doBootstrap (file:///.npm/_npx/d1873648c02c7df8/node_modules/trigger.dev/src/entryPoints/managed-run-worker.ts:167:10)
at bootstrap (file:///.npm/_npx/d1873648c02c7df8/node_modules/trigger.dev/src/entryPoints/managed-run-worker.ts:266:22)
trigger.config.ts
import dotenv from "dotenv";
dotenv.config(); // line 11 — the bootstrap fails before this even runs
Additional information
The referenced files (scripts/dev/env/process.ts, trigger-config-bootstrap.ts) are not in the npm package or public repo — they appear to be part of the managed cloud worker infrastructure. The managed worker seems to expect env/local.public to exist on the worker filesystem before loading the user config.
Provide environment information
Describe the bug
Managed runs fail during worker bootstrap with
MissingManagedEnvFileError: Missing env file: env/local.public. The error occurs beforetrigger.config.tsloads — in trigger.dev's internal managed worker bootstrap (scripts/dev/env/trigger-config-bootstrap.ts).Environment variables ARE configured in the dashboard for this project.
Stack trace
trigger.config.ts
Additional information
The referenced files (
scripts/dev/env/process.ts,trigger-config-bootstrap.ts) are not in the npm package or public repo — they appear to be part of the managed cloud worker infrastructure. The managed worker seems to expectenv/local.publicto exist on the worker filesystem before loading the user config.