The rrule v2.8.1 package's main field points to a CJS bundle. When the worker
runs under Node 22 with "type": "module", Node resolves to the CJS main which
only has a default export. The previous 'import { RRule } from rrule' worked
during typecheck (TypeScript uses the .d.ts) but crashed at runtime:
SyntaxError: The requested module 'rrule' does not provide an export named 'RRule'
Use namespace-default import + destructure to handle both CJS and ESM at runtime
while preserving the static RRule reference. Verified with node --input-type=module
that RRule.fromString works correctly.
This was a deploy blocker: docker compose up kept restarting the worker.
- Add @project-e/db package with Drizzle schema and migrations
- Replace PocketBase client with PostgreSQL-based database client
- Migrate auth from custom to NextAuth.js
- Add Docker Compose with PostgreSQL container
- Update worker to use new database client
- Remove PocketBase-specific files and migrations
- Add drizzle config and initial migration