The API routes (apps/api/src/routes/tasks.ts) still import and query
taskDependencies, and the live DB still has the task_dependencies table,
but commit 997aff8 dropped the schema definition. This caused the API
container to crash-loop at startup with:
SyntaxError: Export named 'taskDependencies' not found
Restore the junction table definition (task_id + depends_on_task_id,
composite PK, index) matching the pre-refactor schema.
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.
Leftover lint cleanups to make 'npm run lint' pass on the integrated branch:
- calendar/page.tsx: add eslint-disable for mount-only useEffect blocks
- import/route.ts: replace destructure-and-ignore with renames (_id, _created, _updated)
- settings-agents.tsx: escape apostrophe in JSX text
- Remove packages/cli (referenced dropped v1 'records' table, broken since 6c438ea)
- Remove packages/cli from root workspaces
- Add eslint + eslint-config-next to apps/web so 'npm run lint' runs
- Regenerate package-lock.json
This unblocks typecheck/build/lint for the v2 rewrite.