n8n-io/n8n · error

Failed to install workspace package tarballs

Error message

Failed to install workspace package tarballs: ${install.stderr}

What it means

During SDK linking, the sandboxed `npm install <tarballs> --no-save --ignore-scripts --force` exited non-zero, so the packed workspace packages could not be linked into the sandbox. stderr of the npm process is included; a logger.error also records the exit code.

Solutions

  1. Check the npm stderr for the failing package and fix it (corrupt tarball, npm registry unreachable)
  2. Retry setup once network/registry access is restored
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at packages/@n8n/instance-ai/src/workspace/sandbox-setup.ts:221 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/b5f2f4952c1cb5eb. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/instance-ai/src/workspace/sandbox-setup.ts:221

		} else {
			await writeFileViaSandbox(workspace, remotePath, packed.tarball);
		}
	}

	const tarballArgs = remotePaths
		.map((remotePath) => `'${escapeSingleQuotes(remotePath)}'`)
		.join(' ');
	const install = await runInSandbox(
		workspace,
		`npm install ${tarballArgs} --no-save --ignore-scripts --force`,
		root,
	);
	if (install.exitCode !== 0) {
		logger.error('Failed to link workspace packages into sandbox', {
			exitCode: install.exitCode,
			stderr: install.stderr,
		});
		throw new Error(`Failed to install workspace package tarballs: ${install.stderr}`);
	}

	logger.info('Linked workspace packages into sandbox', {
		packages: packedPackages.map((packed) => ({
			name: packed.packageName,
			version: packed.version,
			path: packed.packagePath,
		})),
	});
}

/**
 * Runner script that executes a workflow TS file via tsx, calls validate() + toJSON(),
 * and outputs structured JSON to stdout. Executed via: node --import tsx build.mjs ./src/workflow.ts
 */
export const BUILD_MJS = `const filePath = process.argv[2] || './src/workflow.ts';
try {
  const mod = await import(filePath);

View on GitHub (pinned to 5ac6606e81)