earendil-works/pi · error · Error
Missing source
Error message
Missing source: ${resolvedSource} What it means
Guard while resolving configured package sources: a source recorded in settings resolves to a managed install location whose expected artifact is missing on disk (deleted or never installed), and automatic re-install could not proceed.
Solutions
- Reinstall the package (pi package install <source>)
- Remove the stale entry from settings
- Check whether offline mode prevented the automatic reinstall and retry online
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at packages/coding-agent/src/core/package-manager.ts:1279 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/5adaa779a71927d1.
Report an issue: GitHub.
Appendix: source
Thrown at packages/coding-agent/src/core/package-manager.ts:1279
const resolvedScope = deltaBase?.scope ?? scope;
const parsed = this.parseSource(resolvedSource);
const metadata: PathMetadata = { source: sourceStr, scope, origin: "package" };
if (parsed.type === "local") {
const baseDir = this.getBaseDirForScope(resolvedScope);
this.resolveLocalExtensionSource(parsed, accumulator, filter, metadata, baseDir);
continue;
}
const installMissing = async (): Promise<boolean> => {
if (isOfflineModeEnabled()) return false;
if (!onMissing) {
await this.installParsedSource(parsed, resolvedScope);
return true;
}
const action = await onMissing(resolvedSource);
if (action === "skip") return false;
if (action === "error") throw new Error(`Missing source: ${resolvedSource}`);
await this.installParsedSource(parsed, resolvedScope);
return true;
};
if (parsed.type === "npm") {
let installedPath = this.getNpmInstallPath(parsed, resolvedScope);
const needsInstall =
!existsSync(installedPath) || !(await this.installedNpmMatchesConfiguredVersion(parsed, installedPath));
if (needsInstall) {
const installed = await installMissing();
if (!installed) continue;
installedPath = this.getNpmInstallPath(parsed, resolvedScope);
}
metadata.baseDir = installedPath;
this.collectPackageResources(installedPath, accumulator, filter, metadata);
continue;
}
View on GitHub (pinned to 4af9d21d3b)