Mintplex-Labs/anything-llm · critical · Error
QEMU directory not found: ${dir} Contents of ${parent}: ${co
Error message
QEMU directory not found: ${dir}
Contents of ${parent}: ${contents}
Make sure the QEMU archive is extracted so that the folder is named "${variant}" (not "qemu-${variant}" or a nested subfolder). You can also set OPEN_COMPUTER_QEMU_DIR to point to your QEMU installation. What it means
Thrown only on Windows by defaultQemuDir() when the expected QEMU distribution folder (<OPEN_COMPUTER_DIR>/master/qemu/<variant>) does not exist. The message is intentionally verbose: it dumps the parent directory's contents to help diagnose archive-extraction layout mistakes, and tells the user the exact expected folder name and the OPEN_COMPUTER_QEMU_DIR escape hatch. Linux returns '' (system QEMU); macOS does not pre-check.
Source
Thrown at open-computer/cli/src/config.ts:35
// On Windows x64 the guest is x86_64 (WHPX + amd64 Debian).
// On Windows arm64 the guest is aarch64 (WHPX + ARM64 Debian).
export const GUEST_ARCH: 'aarch64' | 'x86_64' = ARCH === 'x64' ? 'x86_64' : 'aarch64';
export const QEMU_BINARY =
GUEST_ARCH === 'aarch64' ? 'qemu-system-aarch64' : 'qemu-system-x86_64';
function defaultQemuDir(): string {
if (PLATFORM === 'darwin') {
const darwinVariant = ARCH === 'x64' ? 'darwin-x64' : 'darwin-arm64';
return path.join(OPEN_COMPUTER_DIR, 'master', 'qemu', darwinVariant);
}
if (PLATFORM === 'win32') {
const variant = ARCH === 'x64' ? 'win-x64' : 'win-arm64';
const dir = path.join(OPEN_COMPUTER_DIR, 'master', 'qemu', variant);
if (!fs.existsSync(dir)) {
const parent = path.join(OPEN_COMPUTER_DIR, 'master', 'qemu');
const contents = fs.existsSync(parent) ? fs.readdirSync(parent).join(', ') : '(directory missing)';
throw new Error(
`QEMU directory not found: ${dir}\n` +
`Contents of ${parent}: ${contents}\n` +
`Make sure the QEMU archive is extracted so that the folder is named "${variant}" ` +
`(not "qemu-${variant}" or a nested subfolder). ` +
`You can also set OPEN_COMPUTER_QEMU_DIR to point to your QEMU installation.`
);
}
return dir;
}
// Linux: assume system QEMU
return '';
}
export const QEMU_DIST = process.env.OPEN_COMPUTER_QEMU_DIR ?? defaultQemuDir();
// Full path to the QEMU binary (with .exe on Windows)
export function resolveQemuBinary(): string {
const binaryName = PLATFORM === 'win32' ? `${QEMU_BINARY}.exe` : QEMU_BINARY;View on GitHub (pinned to 526360e320)
Solutions
- Re-extract the QEMU archive so the folder is named exactly win-x64 or win-arm64 directly under master/qemu/.
- If the layout is correct but in a custom location, set OPEN_COMPUTER_QEMU_DIR to that absolute path.
- Verify ARCH matches the downloaded archive (x64 vs arm64).
- Use the parent-directory contents printed in the error to identify the wrapper folder, then move/rename it.
Example fix
// before — archive extracted with wrapper folder // master/qemu/qemu-win-x64/bin/qemu-system-x86_64.exe // after — flatten so the variant folder is direct // master/qemu/win-x64/bin/qemu-system-x86_64.exe // or: set env var // OPEN_COMPUTER_QEMU_DIR=C:\path\to\qemu-win-x64
Defensive patterns
Strategy: validation
Validate before calling
// Pre-flight check on Windows before running the CLI.
const fs = require('fs'), path = require('path');
function qemuDirOk(dir, variant) {
return fs.existsSync(path.join(dir, 'master', 'qemu', variant));
} Try / catch
try {
runCli();
} catch (e) {
if (/QEMU directory not found/.test(e.message)) {
console.error(e.message); // contains the parent-dir listing for diagnosis
process.exit(2);
}
throw e;
} Prevention
- Always set OPEN_COMPUTER_QEMU_DIR if your QEMU install is non-standard.
- After extracting the QEMU archive, verify the variant folder (win-x64/win-arm64) sits directly under master/qemu/.
- Match the downloaded archive's arch to process.arch.
When it happens
Trigger: Running the open-computer CLI on Windows where the QEMU archive was extracted with a wrapper folder (e.g. qemu-win-x64/qemu-win-x64/...), extracted to the wrong location, or never downloaded at all.
Common situations: User extracted qemu-win-x64.zip and got a top-level 'qemu-win-x64' folder instead of 'win-x64' directly under master/qemu/; the master/qemu directory is missing entirely; the user is on Windows ARM64 but downloaded the x64 archive (variant mismatch).
Related errors
- EFI firmware not found: ${EFI_FIRMWARE_FILE} Searched in: ${
- EFI vars template not found: ${file} Searched in: ${QEMU_DIS
- No webSocketDebuggerUrl — is Chromium running?
- No webSocketDebuggerUrl — is Chromium running?
- No base URL was set.
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/b73c5816b104e52d.
Report an issue: GitHub.