Title: bug: CLI crashes with "Invalid comparator: catalog:" when @trigger.dev/* deps use workspace catalogs (bun/pnpm catalog: protocol) · Issue #3905 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: bug: CLI crashes with "Invalid comparator: catalog:" when @trigger.dev/* deps use workspace catalogs (bun/pnpm catalog: protocol) · Issue #3905 · triggerdotdev/trigger.dev
X Title: bug: CLI crashes with "Invalid comparator: catalog:" when @trigger.dev/* deps use workspace catalogs (bun/pnpm catalog: protocol) · Issue #3905 · triggerdotdev/trigger.dev
Description: Provide environment information System: OS: Windows 11 10.0.26200 CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V Memory: 9.90 GB / 31.55 GB Binaries: Node: 22.20.0 npm: 10.9.3 bun: 1.3.14 Deno: 2.7.14 Describe the bug Running trigger dev (o...
Open Graph Description: Provide environment information System: OS: Windows 11 10.0.26200 CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V Memory: 9.90 GB / 31.55 GB Binaries: Node: 22.20.0 npm: 10.9.3 bun: 1.3.14 Deno: 2.7.14...
X Description: Provide environment information System: OS: Windows 11 10.0.26200 CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V Memory: 9.90 GB / 31.55 GB Binaries: Node: 22.20.0 npm: 10.9.3 bun: 1.3.14 Deno: 2.7.14...
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/3905
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: CLI crashes with \"Invalid comparator: catalog:\" when @trigger.dev/* deps use workspace catalogs (bun/pnpm catalog: protocol)","articleBody":"### Provide environment information\n\n System:\n OS: Windows 11 10.0.26200\n CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V\n Memory: 9.90 GB / 31.55 GB\n Binaries:\n Node: 22.20.0 \n npm: 10.9.3\n bun: 1.3.14\n Deno: 2.7.14\n\n### Describe the bug\n\nRunning `trigger dev` (or `deploy`, `preview`, `workers build` — anything that runs the embedded update check) crashes immediately when `@trigger.dev/*` dependencies in package.json use the `catalog:` version protocol (bun and pnpm workspace catalogs):\n\n```\nTypeError: Invalid comparator: catalog:\n at Comparator.parse (.../semver/classes/comparator.js:41:13)\n ...\n at Module.minVersion (.../semver/ranges/min-version.js:8:11)\n at .../trigger.dev/dist/esm/commands/update.js:71:42\n```\n\n### Reproduction repo\n\nSee Repo Info Below\n\n### To reproduce\n\nIn a bun (or pnpm) workspace, define a catalog in the root package.json and reference it from the app that runs the CLI:\n\n```jsonc\n// root package.json\n\"workspaces\": {\n \"packages\": [\"apps/*\"],\n \"catalog\": {\n \"@trigger.dev/sdk\": \"4.4.6\",\n \"trigger.dev\": \"4.4.6\"\n }\n}\n```\n\n```jsonc\n// apps/trigger/package.json\n\"dependencies\": {\n \"@trigger.dev/sdk\": \"catalog:\"\n},\n\"devDependencies\": {\n \"trigger.dev\": \"catalog:\"\n}\n```\n\nThen run `trigger dev`.\n\n### Additional information\n\n`getTriggerDependencies()` in `packages/cli-v3/src/commands/update.ts` explicitly skips `workspace:` specifiers, but has no equivalent skip for `catalog:`:\n\nhttps://github.com/triggerdotdev/trigger.dev/blob/7a54a843e2e9af36515daacb48369b7b1ff3f05c/packages/cli-v3/src/commands/update.ts#L308-L310\n\nWhen the `tryResolveTriggerPackageVersion()` fallback fails to resolve the installed version from node_modules, the raw `\"catalog:\"` string is kept as `dep.version` and flows into `semver.minVersion()` in `getVersionMismatches()`, which throws (it's wrapped in neither a try/catch nor a `semver.validRange` guard):\n\nhttps://github.com/triggerdotdev/trigger.dev/blob/7a54a843e2e9af36515daacb48369b7b1ff3f05c/packages/cli-v3/src/commands/update.ts#L116\n\n## Suggested fix\n\nSkip `catalog:` the same way `workspace:` is skipped:\n\n```ts\nif (version.startsWith(\"workspace\") || version.startsWith(\"catalog:\")) {\n continue;\n}\n```\n\n(Optionally also harden `getVersionMismatches()` — e.g. guard the `semver.minVersion()` call with `semver.validRange(dep.version)` or a try/catch — so any other non-semver specifier degrades to a warning instead of a crash.)\n\nNote: skipping these specifiers entirely does mean catalog users lose the version-mismatch check. A nicer fix would be to keep relying on `tryResolveTriggerPackageVersion()` (which already resolves the real installed version) and only skip when resolution fails — but never letting `catalog:` reach `semver` is the minimal correct change.\n\n## Workaround\n\n`trigger dev --skip-update-check` (and the same flag on `deploy`) bypasses the crashing code path.","author":{"url":"https://github.com/JoeRall","@type":"Person","name":"JoeRall"},"datePublished":"2026-06-11T15:16:22Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/3905"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cfc3011e-8412-b024-cbb3-3c2ee65d4af5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A5E:32A4B7:34C8285:4B50F67:6AFB083E |
| html-safe-nonce | 9fca6f11f89b088c0dd761fc02a92637601f7fdf85fdba271d79683c91c7642f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTVFOjMyQTRCNzozNEM4Mjg1OjRCNTBGNjc6NkFGQjA4M0UiLCJ2aXNpdG9yX2lkIjoiNDI5ODE3MjAwNDgyMjYxNjEyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 530d0f215c790f42a7d5c2c1063ee02fccfac29841391e6f8503d88c6d5ba58f |
| hovercard-subject-tag | issue:4641830824 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/3905/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f412501bb2f5a3893cefb8cb65da20d5e3c6c7c3bcc0a5fca16a3b81312f2841/triggerdotdev/trigger.dev/issues/3905 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f412501bb2f5a3893cefb8cb65da20d5e3c6c7c3bcc0a5fca16a3b81312f2841/triggerdotdev/trigger.dev/issues/3905 |
| og:image:alt | Provide environment information System: OS: Windows 11 10.0.26200 CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V Memory: 9.90 GB / 31.55 GB Binaries: Node: 22.20.0 npm: 10.9.3 bun: 1.3.14 Deno: 2.7.14... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JoeRall |
| hostname | github.com |
| expected-hostname | github.com |
| None | 76fb13cb43f1834708971f45a9cfcab5df3177a7582086613d7cdc6e98c4bfde |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | afc998826cdd963c8f91a96ae5372809ab5e296b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width