earendil-works/pi · error

No Windows cross-compiler found for ${target.arch}. Install

Error message

No Windows cross-compiler found for ${target.arch}. Install Microsoft C++ Build Tools on Windows, or set ${target.envCompiler} to a MinGW-compatible compiler.

What it means

Error "No Windows cross-compiler found for ${target.arch}. Install Microsoft C++ Build Tools on Windows, or set ${target.envCompiler} to a MinGW-compatible compiler." thrown in earendil-works/pi.

Source

Thrown at packages/tui/native/win32/build.mjs:171

				"/link",
				"/NOENTRY",
				"/NODEFAULTLIB",
				"kernel32.lib",
				"/OPT:REF",
				"/OPT:ICF",
			].join(" "),
			"if errorlevel 1 exit /b %errorlevel%",
		].join("\r\n"),
	);

	run("cmd.exe", ["/d", "/s", "/c", batchFile], { cwd: buildDir });
	installOutput(temporaryOutput, target);
}

function buildWithMingw(target) {
	const compiler = resolveMingwCompiler(target);
	if (!compiler) {
		throw new Error(
			`No Windows cross-compiler found for ${target.arch}. Install Microsoft C++ Build Tools on Windows, or set ${target.envCompiler} to a MinGW-compatible compiler.`,
		);
	}

	const buildDir = path.join(temporaryDir, `mingw-${target.arch}`);
	const temporaryOutput = path.join(buildDir, "win32-console-mode.node");
	mkdirSync(buildDir, { recursive: true });

	const args = [
		...(compiler.useTargetFlag ? [`--target=${target.mingwTarget}`] : []),
		"-std=c11",
		"-Wall",
		"-Wextra",
		"-Oz",
		"-shared",
		"-nostdlib",
		"-Wl,--no-entry",
		"-Wl,--strip-all",

View on GitHub (pinned to 4af9d21d3b)

Solutions

  1. Install Microsoft C++ Build Tools on Windows, or set the indicated environment variable to a MinGW-compatible compiler.

When it happens

Trigger: Thrown at packages/tui/native/win32/build.mjs:171 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24). Data as JSON: /api/errors/9a838a1e4873c8b3. Report an issue: GitHub.