Repository navigation
Description
Provide environment information
System:
OS: macOS 26.7.1
CPU: (8) arm64 Apple M3
Memory: 102.94 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.10.0 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 11.6.0 - /opt/homebrew/bin/npm
pnpm: 10.4.1 - /Users/vgupta/.nvm/versions/node/v20.18.1/bin/pnpm
Summary trigger.dev deploy --env prod fails during "Building trigger code" with error: Cannot set properties of undefined (setting 'build'). The error has no stack trace. With the npx-cached CLI, the same failure appeared as [plugin: trigger-config-strip]. It is unclear whether this is the same bug, because the plugin name no longer shows up with the project-local install.
Environment
CLI: trigger.dev 4.8.10
SDK: @trigger.dev/sdk ^4.8.10, with @trigger.dev/build ^4.8.10
Node: <output of node -v>
Project: proj_kkpgxzqxzycroumfwulc, deploying to prod. It has no previous deployments.
Project path contains a space: /Users/vgupta/projects/Python Practice/ccdevelopersignal
Command
npx trigger.dev deploy --env prod --log-level debug
Error (first seen, with the npx-cached CLI)
◇ Failed to build code
✘ [ERROR] Build failed with 1 error:
│ ../../../.npm/_npx/.../node_modules/esbuild/lib/main.js:1552:21:
│ ERROR: [plugin: trigger-config-strip] Cannot set properties of undefined
│ (setting 'build')
Error (latest, with --log-level debug) Bundling completes. The externals step collects import-in-the-middle 3.7.0, with these maybe-externals: import-in-the-middle, header-generator, bcrypt. Then:
◇ Failed to build code
✘ [ERROR] Build failed with 1 error:
│ error: Cannot set properties of undefined (setting 'build')
//trigger.config.ts
//ts
import { defineConfig } from "@trigger.dev/sdk";
export default defineConfig({
project: "proj_kkpgxzqxzycroumfwulc",
maxDuration: 3600,
retries: {
enabledInDev: true,
default: {
maxAttempts: 3,
minTimeoutInMs: 1000,
maxTimeoutInMs: 10000,
factor: 2,
randomize: true,
},
},
dirs: ["./src/trigger"],
build: {},
});
//package.json
//json
{
"name": "ccdevelopersignal",
"version": "1.0.0",
"type": "module",
"dependencies": { "@trigger.dev/sdk": "^4.8.10" },
"devDependencies": { "@trigger.dev/build": "^4.8.10" }
}
trigger.dev was added as a pinned devDependency afterwards.
Already tried, with no change
Added build: {} to the config.
Added "type": "module" to package.json.
Cleared the _npx cache and reinstalled the CLI.
Used the project-local CLI install. The failure moved from the trigger-config-strip plugin message to the plain error above.
Describe the bug
Summary trigger.dev deploy --env prod fails during "Building trigger code" with error: Cannot set properties of undefined (setting 'build'). The error has no stack trace. With the npx-cached CLI, the same failure appeared as [plugin: trigger-config-strip]. It is unclear whether this is the same bug, because the plugin name no longer shows up with the project-local install.
Reproduction repo
https://github.com/Cheetah4ever
To reproduce
vgupta@Varuns-MacBook-Pro ccdevelopersignal % npx trigger.dev@latest deploy --env prod
Suggested fix
No response
Additional information
No response
Activity