paperclipai/paperclip · error · Error
Paperclip server entrypoint did not export startServer()
Error message
Paperclip server entrypoint did not export startServer(): ${label} What it means
startServerFromModule inspected the imported server module and found no startServer export, so the loaded entrypoint is not a valid Paperclip server.
Solutions
- Ensure the resolved server entrypoint exports startServer(); use a supported Paperclip server build.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at cli/src/commands/run.ts:224 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/ea6c2dc6f14e7a62.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/run.ts:250
// Production mode: import the published @paperclipai/server package
try {
const mod = await import("@paperclipai/server");
return await startServerFromModule(mod, "@paperclipai/server");
} catch (err) {
const missingSpecifier = getMissingModuleSpecifier(err);
const missingServerEntrypoint = !missingSpecifier || missingSpecifier === "@paperclipai/server";
if (isModuleNotFoundError(err) && missingServerEntrypoint) {
throw new Error(
`Could not locate a Paperclip server entrypoint.\n` +
`Tried: ${devEntry}, @paperclipai/server\n` +
`${formatError(err)}`,
);
}
throw new Error(
`Paperclip server failed to start.\n` +
`${formatError(err)}`,
);
}
}
function shouldGenerateBootstrapInviteAfterStart(config: PaperclipConfig): boolean {
return config.server.deploymentMode === "authenticated" && config.database.mode === "embedded-postgres";
}
async function startServerFromModule(mod: unknown, label: string): Promise<StartedServer> {
const startServer = (mod as { startServer?: () => Promise<StartedServer> }).startServer;
if (typeof startServer !== "function") {
throw new Error(`Paperclip server entrypoint did not export startServer(): ${label}`);
}
return await startServer();
}
View on GitHub (pinned to 01ad858492)