mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
fix: include migration files in @paperclipai/db and improve server error msg
- db build now copies src/migrations/ to dist/migrations/ after tsc,
so SQL + meta JSON files are included in the published package.
Without this, `import("@paperclipai/server")` fails at runtime with
ENOENT when scanning for migration files.
- CLI's importServerEntry() now distinguishes between "module not found"
and "server crashed during startup" for clearer error messages.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4e9c1d83be
commit
925680f736
2 changed files with 9 additions and 3 deletions
|
|
@ -106,9 +106,15 @@ async function importServerEntry(): Promise<void> {
|
|||
try {
|
||||
await import("@paperclipai/server");
|
||||
} catch (err) {
|
||||
if (isModuleNotFoundError(err)) {
|
||||
throw new Error(
|
||||
`Could not locate a Paperclip server entrypoint.\n` +
|
||||
`Tried: ${devEntry}, @paperclipai/server\n` +
|
||||
`${formatError(err)}`,
|
||||
);
|
||||
}
|
||||
throw new Error(
|
||||
`Could not locate a Paperclip server entrypoint.\n` +
|
||||
`Tried: ${devEntry}, @paperclipai/server\n` +
|
||||
`Paperclip server failed to start.\n` +
|
||||
`${formatError(err)}`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue