github/copilot-sdk · error
not found at .
Error message
${label} not found at ${path}. What it means
validateFile asserts a required runtime artifact exists on disk before the SDK uses it. When the path does not exist it throws '<label> not found at <path>'. It is used to verify the Copilot runtime wrapper and runtime.node inside platform packages.
Solutions
- Reinstall the SDK: npm install @github/copilot-sdk (ensures the platform package is restored).
- Clear npm cache and node_modules, then reinstall to repair a corrupted install.
- Verify the platform package (e.g. @github/copilot-linux-x64) actually appears in node_modules.
- Check packageSearchPaths/options point at the right node_modules root.
Example fix
// before ls node_modules/@github/copilot-linux-x64/prebuilds/linux-x64/ # runtime.node missing // after rm -rf node_modules package-lock.json && npm install
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync, statSync } from 'fs';
if (!existsSync(path)) throw new Error(`${label} missing at ${path}; reinstall @github/copilot-sdk`); Try / catch
try {
const wrapper = getBundledRuntimePath();
} catch (e) {
if (e.message.includes('not found at')) {
// trigger reinstall instructions / fallback to another install root
} else throw e;
} Prevention
- Always install with optional dependencies enabled.
- Verify platform package presence in CI before launching sessions.
- Avoid copying node_modules between machines/OSes.
When it happens
Trigger: ensureCopilotPackage, downloadCopilotPackage, validateRuntimeBundle, or ensureRuntimeBundle is called and the wrapper/runtime.node path passed to validateFile does not exist on disk.
Common situations: Partial npm install that skipped optional platform packages, corrupted install, wrong packageSearchPaths, CI cache that pruned prebuild directories, running on a platform with no package published.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- is missing required Copilot CLI runtime files. Reinstall…
- at is empty.
- Could not resolve . Reinstall @github/copilot-sdk so its…
- creating install directory
- hashing existing binary
AI-assisted analysis of github/copilot-sdk@cd8cf15dc3 (2026-09-09).
Data as JSON: /api/errors/c017a9d4d60e90ed.
Report an issue: GitHub.
Appendix: source
Thrown at nodejs/src/runtimeArtifacts.ts:68
"LICENSE.md",
"napi-oop-runtime",
"npm-loader.js",
"package.json",
"pvrecorder",
"queries",
"README.md",
"sea-loader.js",
"webview",
]);
interface RuntimeAsset {
source: string;
relativePath: string;
}
export function validateFile(path: string, label: string): void {
if (!existsSync(path)) {
throw new Error(`${label} not found at ${path}.`);
}
if (statSync(path).size === 0) {
throw new Error(`${label} at ${path} is empty.`);
}
}
function validateRuntimeBundle(wrapper: string, runtimeNode: string): void {
validateFile(wrapper, "Copilot runtime wrapper");
validateFile(runtimeNode, "Copilot runtime.node");
}
function isExcluded(relativePath: string): boolean {
const parts = relativePath.split(sep);
const topLevel = parts[0];
const fileName = parts.at(-1) ?? "";
return (
EXCLUDED_TOP_LEVEL.has(topLevel) ||
/^tree-sitter.*\.wasm$/.test(topLevel) ||View on GitHub (pinned to cd8cf15dc3)