Skip to content

Commit 343cb45

Browse files
committed
Don't require STACK_VERCEL_SANDBOX_TEAM_ID anymore
1 parent 7a1cf40 commit 343cb45

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

apps/backend/src/lib/js-execution.tsx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,14 @@ function createVercelSandboxEngine(): JsEngine {
6060
const projectId = getEnvVariable("STACK_VERCEL_SANDBOX_PROJECT_ID", "");
6161
const token = getEnvVariable("STACK_VERCEL_SANDBOX_TOKEN", "");
6262

63-
if (!teamId || !projectId || !token) {
64-
throw new StackAssertionError(
65-
"Vercel Sandbox requires STACK_VERCEL_SANDBOX_TEAM_ID, STACK_VERCEL_SANDBOX_PROJECT_ID, and STACK_VERCEL_SANDBOX_TOKEN to be set."
66-
);
67-
}
68-
69-
const sandboxCreateParams = {
63+
const sandbox = await Sandbox.create({
7064
resources: { vcpus: 2 },
7165
timeout: 30000,
7266
runtime: 'node24' as const,
73-
teamId,
74-
projectId,
75-
token,
76-
};
77-
78-
const sandbox = await Sandbox.create(sandboxCreateParams);
67+
teamId: teamId || undefined,
68+
projectId: projectId || undefined,
69+
token: token || undefined,
70+
});
7971

8072
try {
8173
if (options.nodeModules && Object.keys(options.nodeModules).length > 0) {

0 commit comments

Comments
 (0)