paperclipai/paperclip · critical
Paperclip server entrypoint did not export startServer(): ${
Error message
Paperclip server entrypoint did not export startServer(): ${label} What it means
Thrown by startServerFromModule() when the imported server module does not expose a `startServer` function. The entrypoint resolved and imported but its public API is incompatible — most likely a version mismatch between the CLI and the server package.
Source
Thrown at cli/src/commands/run.ts:224
`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 67001ec6eb)
Solutions
- Align versions: ensure the installed `@paperclipai/server` matches the CLI's expected version (check package.json / lockfile).
- Reinstall both packages together from a clean lockfile.
- If developing in the monorepo, rebuild the server package: `pnpm --filter @paperclipai/server build`.
- Confirm no local file is shadowing the package via NODE_PATH/paths or a stray `node_modules/@paperclipai/server`.
Example fix
// before: stale server export mod.startServer // undefined // after: rebuild/align server pnpm --filter @paperclipai/server build pnpm install
Defensive patterns
Strategy: type-guard
Validate before calling
function hasStartServer(mod: unknown): mod is { startServer: () => Promise<unknown> } {
return typeof (mod as any)?.startServer === 'function';
}
if (!hasStartServer(mod)) throw new Error(`Incompatible server module: ${label}`); Type guard
function isServerModule(mod: unknown): mod is { startServer: () => Promise<unknown> } {
return mod !== null && typeof mod === 'object' && typeof (mod as { startServer?: unknown }).startServer === 'function';
} Prevention
- Keep CLI and @paperclipai/server versions in sync via a shared lockfile.
- Rebuild the server package after edits so the published export reflects changes.
When it happens
Trigger: The dev `server/src/index.ts` or `@paperclipai/server` imported successfully but `(mod as {startServer?}).startServer` is undefined or not a function. Common when the server package version predates the startServer export, or a custom/aliased module is loaded that lacks the export.
Common situations: CLI and server package versions are out of sync (e.g. newer CLI, older globally installed server); a local file shadows @paperclipai/server; a corrupted/partial build of the server left out the entry export.
Related errors
- Could not locate a Paperclip server entrypoint.\nTried: ${de
- Paperclip server failed to start.\n${formatError(err)}
- Invalid --include value. Use one or more of: company,agents,
- Import transfer declaration returned no data.
- Export request returned no data
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/ea6c2dc6f14e7a62.
Report an issue: GitHub.