No description
The collab server was using createRequire() with hardcoded relative paths (../../../packages/database/package.json, ../node_modules/@hocuspocus/server/...) to grab `eq` from drizzle-orm and `Forbidden` from @hocuspocus/common. That worked under tsx in dev but fell apart in the bundled prod image because those paths don't exist there and pnpm's symlink topology in the runtime node_modules wasn't reachable from inside the bundled dist file. Result at runtime: Cannot find module '@hocuspocus/common' on every collab restart, infinite crash loop. Switch both to plain ESM imports — tsup bundles them into dist/index.mjs directly, no runtime resolution needed. Add @hocuspocus/common and drizzle-orm as explicit deps so they're properly tracked. Verified locally: bundle now resolves cleanly with no createRequire calls (actually shrinks from 304 KB to 102 KB after dead-code elimination). Made-with: Cursor |
||
|---|---|---|
| apps | ||
| config | ||
| docker | ||
| docs | ||
| packages | ||
| plans | ||
| .env.example | ||
| .gitignore | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| tsconfig.json | ||
| turbo.json | ||