Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ed41f0a
fix(cli-v3): allow disabling source-map-support to prevent OOM with S…
Feb 2, 2026
023c3fd
fix(cli-v3): ignore engine checks during deployment install to preven…
Feb 2, 2026
93aa053
fix(core): delegate to original console in ConsoleInterceptor to pres…
Feb 2, 2026
8b684e1
fix(cli-v3): authenticate to Docker Hub to prevent rate limits (#2911)
Feb 2, 2026
737ad56
fix(cli-v3): ensure worker cleanup on SIGINT/SIGTERM (#2909)
Feb 2, 2026
c97cbcc
verify: add reproduction scripts and PR details for all major fixes
Feb 3, 2026
aa90db9
verify: add reproduction scripts and PR details for all major fixes
Feb 3, 2026
f5ce2bc
docs: add consolidated PR body description
Feb 3, 2026
8c986db
chore: remove reproduction scripts and temporary files
Feb 3, 2026
82f198f
Merge remote-tracking branch 'remotes/origin/fix/sentry-oom-2920'
Feb 8, 2026
9a3e8d0
Merge branch 'fix/issue-2909-orphaned-workers'
Feb 9, 2026
e101f8e
chore: remove reproduction scripts after verification
Feb 9, 2026
d01d438
fix: resolve typecheck errors after merge
Feb 9, 2026
aafb736
fix(webapp): auto-recover replication services after stream errors
ericallam May 13, 2026
7fa3a16
fix(webapp): reschedule reconnect when subscribe() throws
ericallam May 13, 2026
4e6461a
fix(webapp): reschedule reconnect when subscribe() returns stopped
ericallam May 15, 2026
4b5db51
fix(webapp): drop bogus isStopped check, route leader-lock failure th…
ericallam May 15, 2026
5365936
fix(webapp): scope leaderElection-lost recovery to reconnect strategy
ericallam May 15, 2026
d35bf04
Merge pull request #10 from deepshekhardas/pr/3613-replication-fix
deepshekhardas May 20, 2026
5f4c41a
feat: migrate Prisma from 6.14.0 to 7.7.0 with driver adapters (PR #3…
Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(cli-v3): ignore engine checks during deployment install to preven…
…t build server failures (#2913)
  • Loading branch information
Deploy Bot
Deploy Bot committed Feb 2, 2026
commit 023c3fdca08b0332a2e8a8212e90d5e966a36a0a
5 changes: 5 additions & 0 deletions .changeset/fix-github-install-node-version-2913.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@trigger.dev/cli-v3": patch
---

Fix: Ignore engine checks during deployment install phase to prevent failure on build server when Node version mismatch exists. (#2913)
86 changes: 36 additions & 50 deletions packages/cli-v3/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
}

if (!options.skipUpdateCheck) {
await updateTriggerPackages(dir, { ...options }, true, true);
await updateTriggerPackages(dir, { ...options, ignoreEngines: true }, true, true);
}

const cwd = process.cwd();
Expand Down Expand Up @@ -489,9 +489,8 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
const version = deployment.version;

const rawDeploymentLink = `${authorization.dashboardUrl}/projects/v3/${resolvedConfig.project}/deployments/${deployment.shortCode}`;
const rawTestLink = `${authorization.dashboardUrl}/projects/v3/${
resolvedConfig.project
}/test?environment=${options.env === "prod" ? "prod" : "stg"}`;
const rawTestLink = `${authorization.dashboardUrl}/projects/v3/${resolvedConfig.project
}/test?environment=${options.env === "prod" ? "prod" : "stg"}`;

const deploymentLink = cliLink("View deployment", rawDeploymentLink);
const testLink = cliLink("Test tasks", rawTestLink);
Expand Down Expand Up @@ -708,8 +707,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
}
} else {
outro(
`Version ${version} deployed with ${taskCount} detected task${taskCount === 1 ? "" : "s"} ${
isLinksSupported ? `| ${deploymentLink} | ${testLink}` : ""
`Version ${version} deployed with ${taskCount} detected task${taskCount === 1 ? "" : "s"} ${isLinksSupported ? `| ${deploymentLink} | ${testLink}` : ""
}`
);

Expand All @@ -733,18 +731,16 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
TRIGGER_VERSION: version,
TRIGGER_DEPLOYMENT_SHORT_CODE: deployment.shortCode,
TRIGGER_DEPLOYMENT_URL: `${authorization.dashboardUrl}/projects/v3/${resolvedConfig.project}/deployments/${deployment.shortCode}`,
TRIGGER_TEST_URL: `${authorization.dashboardUrl}/projects/v3/${
resolvedConfig.project
}/test?environment=${options.env === "prod" ? "prod" : "stg"}`,
TRIGGER_TEST_URL: `${authorization.dashboardUrl}/projects/v3/${resolvedConfig.project
}/test?environment=${options.env === "prod" ? "prod" : "stg"}`,
},
outputs: {
deploymentVersion: version,
workerVersion: version,
deploymentShortCode: deployment.shortCode,
deploymentUrl: `${authorization.dashboardUrl}/projects/v3/${resolvedConfig.project}/deployments/${deployment.shortCode}`,
testUrl: `${authorization.dashboardUrl}/projects/v3/${
resolvedConfig.project
}/test?environment=${options.env === "prod" ? "prod" : "stg"}`,
testUrl: `${authorization.dashboardUrl}/projects/v3/${resolvedConfig.project
}/test?environment=${options.env === "prod" ? "prod" : "stg"}`,
needsPromotion: options.skipPromotion ? "true" : "false",
},
});
Expand Down Expand Up @@ -787,8 +783,7 @@ async function failDeploy(
checkLogsForErrors(logs);

outro(
`${chalkError(`${prefix}:`)} ${
error.message
`${chalkError(`${prefix}:`)} ${error.message
}. Full build logs have been saved to ${logPath}`
);

Expand Down Expand Up @@ -1088,9 +1083,8 @@ async function handleNativeBuildServerDeploy({
const deployment = initializeDeploymentResult.data;

const rawDeploymentLink = `${dashboardUrl}/projects/v3/${config.project}/deployments/${deployment.shortCode}`;
const rawTestLink = `${dashboardUrl}/projects/v3/${config.project}/test?environment=${
options.env === "prod" ? "prod" : "stg"
}`;
const rawTestLink = `${dashboardUrl}/projects/v3/${config.project}/test?environment=${options.env === "prod" ? "prod" : "stg"
}`;

const exposedDeploymentLink = isLinksSupported
? cliLink(chalk.bold(rawDeploymentLink), rawDeploymentLink)
Expand Down Expand Up @@ -1156,8 +1150,7 @@ async function handleNativeBuildServerDeploy({
log.warn(`Failed streaming build logs, open the deployment in the dashboard to view the logs`);

outro(
`Version ${deployment.version} is being deployed ${
isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
`Version ${deployment.version} is being deployed ${isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
}`
);

Expand Down Expand Up @@ -1204,10 +1197,10 @@ async function handleNativeBuildServerDeploy({
level === "error"
? chalk.bold(chalkError(message))
: level === "warn"
? chalkWarning(message)
: level === "debug"
? chalkGrey(message)
: message;
? chalkWarning(message)
: level === "debug"
? chalkGrey(message)
: message;

// We use console.log here instead of clack's logger as the current version does not support changing the line spacing.
// And the logs look verbose with the default spacing.
Expand Down Expand Up @@ -1240,8 +1233,7 @@ async function handleNativeBuildServerDeploy({
log.error("Failed dequeueing build, please try again shortly");

throw new OutroCommandError(
`Version ${deployment.version} ${
isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
`Version ${deployment.version} ${isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
}`
);
}
Expand All @@ -1256,8 +1248,7 @@ async function handleNativeBuildServerDeploy({
}

throw new OutroCommandError(
`Version ${deployment.version} ${
isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
`Version ${deployment.version} ${isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
}`
);
}
Expand All @@ -1283,13 +1274,12 @@ async function handleNativeBuildServerDeploy({
}

outro(
`Version ${deployment.version} was deployed ${
isLinksSupported
? `| ${cliLink("Test tasks", rawTestLink)} | ${cliLink(
"View deployment",
rawDeploymentLink
)}`
: ""
`Version ${deployment.version} was deployed ${isLinksSupported
? `| ${cliLink("Test tasks", rawTestLink)} | ${cliLink(
"View deployment",
rawDeploymentLink
)}`
: ""
}`
);
return process.exit(0);
Expand All @@ -1303,14 +1293,13 @@ async function handleNativeBuildServerDeploy({
chalk.bold(
chalkError(
"Deployment failed" +
(finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "")
(finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "")
)
)
);

throw new OutroCommandError(
`Version ${deployment.version} deployment failed ${
isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
`Version ${deployment.version} deployment failed ${isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
}`
);
}
Expand All @@ -1323,14 +1312,13 @@ async function handleNativeBuildServerDeploy({
chalk.bold(
chalkError(
"Deployment timed out" +
(finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "")
(finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "")
)
)
);

throw new OutroCommandError(
`Version ${deployment.version} deployment timed out ${
isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
`Version ${deployment.version} deployment timed out ${isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
}`
);
}
Expand All @@ -1343,14 +1331,13 @@ async function handleNativeBuildServerDeploy({
chalk.bold(
chalkError(
"Deployment was canceled" +
(finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "")
(finalDeploymentEvent.message ? `: ${finalDeploymentEvent.message}` : "")
)
)
);

throw new OutroCommandError(
`Version ${deployment.version} deployment canceled ${
isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
`Version ${deployment.version} deployment canceled ${isLinksSupported ? `| ${cliLink("View deployment", rawDeploymentLink)}` : ""
}`
);
}
Expand All @@ -1369,13 +1356,12 @@ async function handleNativeBuildServerDeploy({
}

outro(
`Version ${deployment.version} ${
isLinksSupported
? `| ${cliLink("Test tasks", rawTestLink)} | ${cliLink(
"View deployment",
rawDeploymentLink
)}`
: ""
`Version ${deployment.version} ${isLinksSupported
? `| ${cliLink("Test tasks", rawTestLink)} | ${cliLink(
"View deployment",
rawDeploymentLink
)}`
: ""
}`
);
return process.exit(0);
Expand Down
113 changes: 113 additions & 0 deletions packages/cli-v3/src/commands/update.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@

import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { updateTriggerPackages } from "./update.js";
import * as nypm from "nypm";
import * as pkgTypes from "pkg-types";
import * as fs from "node:fs/promises";
import * as clack from "@clack/prompts";
import path from "node:path";

// Mock dependencies
vi.mock("nypm");
vi.mock("pkg-types");
vi.mock("node:fs/promises");
vi.mock("@clack/prompts");
vi.mock("std-env", () => ({
hasTTY: true,
isCI: false,
}));
vi.mock("../utilities/initialBanner.js", () => ({
updateCheck: vi.fn().mockResolvedValue(undefined),
printStandloneInitialBanner: vi.fn(),
}));
vi.mock("../version.js", () => ({
VERSION: "3.0.0",
}));
vi.mock("../cli/common.js", () => ({
CommonCommandOptions: { pick: () => ({}) },
}));
vi.mock("../utilities/cliOutput.js", () => ({
chalkError: vi.fn(),
prettyError: vi.fn(),
prettyWarning: vi.fn(),
}));
vi.mock("../utilities/fileSystem.js", () => ({
removeFile: vi.fn(),
writeJSONFilePreserveOrder: vi.fn(),
}));
vi.mock("../utilities/logger.js", () => ({
logger: {
debug: vi.fn(),
log: vi.fn(),
table: vi.fn(),
},
}));
vi.mock("../utilities/windows.js", () => ({
spinner: () => ({
start: vi.fn(),
message: vi.fn(),
stop: vi.fn(),
}),
}));

describe("updateTriggerPackages", () => {
beforeEach(() => {
vi.resetAllMocks();

// Default mocks
vi.mocked(fs.writeFile).mockResolvedValue(undefined);
vi.mocked(fs.rm).mockResolvedValue(undefined);
vi.mocked(pkgTypes.readPackageJSON).mockResolvedValue({
dependencies: {
"@trigger.dev/sdk": "2.0.0", // Mismatch
},
});
vi.mocked(pkgTypes.resolvePackageJSON).mockResolvedValue("/path/to/package.json");
vi.mocked(clack.confirm).mockResolvedValue(true); // User confirms update
vi.mocked(nypm.installDependencies).mockResolvedValue(undefined);
});

afterEach(() => {
vi.clearAllMocks();
});

it("should pass --no-engine-strict for npm when ignoreEngines is true", async () => {
vi.mocked(nypm.detectPackageManager).mockResolvedValue({ name: "npm", command: "npm", version: "1.0.0" } as any);

await updateTriggerPackages(".", { ignoreEngines: true } as any, true, true);

expect(nypm.installDependencies).toHaveBeenCalledWith(expect.objectContaining({
args: ["--no-engine-strict"],
}));
});

it("should pass --config.engine-strict=false for pnpm when ignoreEngines is true", async () => {
vi.mocked(nypm.detectPackageManager).mockResolvedValue({ name: "pnpm", command: "pnpm", version: "1.0.0" } as any);

await updateTriggerPackages(".", { ignoreEngines: true } as any, true, true);

expect(nypm.installDependencies).toHaveBeenCalledWith(expect.objectContaining({
args: ["--config.engine-strict=false"],
}));
});

it("should pass --ignore-engines for yarn when ignoreEngines is true", async () => {
vi.mocked(nypm.detectPackageManager).mockResolvedValue({ name: "yarn", command: "yarn", version: "1.0.0" } as any);

await updateTriggerPackages(".", { ignoreEngines: true } as any, true, true);

expect(nypm.installDependencies).toHaveBeenCalledWith(expect.objectContaining({
args: ["--ignore-engines"],
}));
});

it("should NOT pass engine flags if ignoreEngines is false (default)", async () => {
vi.mocked(nypm.detectPackageManager).mockResolvedValue({ name: "npm", command: "npm", version: "1.0.0" } as any);

await updateTriggerPackages(".", { ignoreEngines: false } as any, true, true);

expect(nypm.installDependencies).toHaveBeenCalledWith(expect.objectContaining({
args: [],
}));
});
});
22 changes: 19 additions & 3 deletions packages/cli-v3/src/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import * as semver from "semver";
export const UpdateCommandOptions = CommonCommandOptions.pick({
logLevel: true,
skipTelemetry: true,
ignoreEngines: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Option to skip Node version checks during deployment install has no effect

The new setting for skipping Node engine checks is accepted and forwarded (ignoreEngines: true at packages/cli-v3/src/commands/update.ts:21 and packages/cli-v3/src/commands/deploy.ts:262) but the install step never uses it, so deployments still fail when the project declares a stricter Node version.
Impact: The advertised fix for build-server deployment failures on Node version mismatch does not work, and the newly added tests for it fail.

Missing plumbing into installDependencies

updateTriggerPackages still calls await installDependencies({ cwd: projectPath, silent: true }); (packages/cli-v3/src/commands/update.ts:260) with no args. The new test file packages/cli-v3/src/commands/update.test.ts:74-112 asserts installDependencies is called with args: ["--no-engine-strict"] (npm), ["--config.engine-strict=false"] (pnpm), ["--ignore-engines"] (yarn) and [] otherwise — none of which can pass against the current implementation.

The fix is to derive the package-manager-specific flag from options.ignoreEngines and pass it as args to installDependencies.

Prompt for agents
packages/cli-v3/src/commands/update.ts now accepts an `ignoreEngines` option (added to UpdateCommandOptions and passed from deploy.ts), but updateTriggerPackages never uses it: it still calls installDependencies({ cwd, silent: true }) with no args. The new test packages/cli-v3/src/commands/update.test.ts expects package-manager-specific flags to be forwarded (npm: --no-engine-strict, pnpm: --config.engine-strict=false, yarn: --ignore-engines, otherwise []). Implement the mapping using the already-detected packageManager and pass the resulting array as `args` to installDependencies.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

});

export type UpdateCommandOptions = z.infer<typeof UpdateCommandOptions>;
Expand Down Expand Up @@ -257,11 +258,26 @@ export async function updateTriggerPackages(
`Installing new package versions${packageManager ? ` with ${packageManager.name}` : ""}`
);

await installDependencies({ cwd: projectPath, silent: true });
const installArgs: string[] = [];

if (options.ignoreEngines && packageManager) {
switch (packageManager.name) {
case "npm":
installArgs.push("--no-engine-strict");
break;
case "pnpm":
installArgs.push("--config.engine-strict=false");
break;
case "yarn":
installArgs.push("--ignore-engines");
break;
}
}

await installDependencies({ cwd: projectPath, silent: true, args: installArgs });
} catch (error) {
installSpinner.stop(
`Failed to install new package versions${
packageManager ? ` with ${packageManager.name}` : ""
`Failed to install new package versions${packageManager ? ` with ${packageManager.name}` : ""
}`
);

Expand Down