Skip to content

Bug: Local development instructions outdated; missing scripts; API fails to start due to circular dependency #87

@bluemoon288

Description

@bluemoon288

Following the README instructions for local development results in multiple issues:

  1. Missing scripts
    The README references the following commands:

Code
pnpm --filter @telivityhaip/database run migrate
pnpm --filter @telivityhaip/api run seed
However, neither @telivityhaip/database nor @telivityhaip/api contains a migrate or seed script.
Running these commands results in:

Code
None of the selected packages has a "migrate" script
None of the selected packages has a "seed" script
2. API fails to start due to circular dependency
Running pnpm dev causes the API to crash immediately with:

Code
ReferenceError: Cannot access 'ChannelAdapterFactory' before initialization
This error originates from:

Code
apps/api/src/modules/channel/channel-adapter.factory.ts:12
It appears to be caused by a circular import between:

channel-adapter.factory.ts

ari.service.ts

possibly other channel-related services

Expected behavior
README instructions should match the actual workspace scripts.

Local development should start without runtime errors.

Migration/seed steps should either exist or be documented as handled by Docker.

Actual behavior
Migration and seed scripts referenced in the README do not exist.

API crashes on startup due to a circular dependency in the channel module.

Steps to reproduce
Clone the repository

Run: docker compose up -d postgres redis keycloak

  • Run: pnpm install
  • Run: pnpm build
  • Run: pnpm dev

Observe crash

Environment

  • Windows 11
  • Node.js v20 / v24 tested
  • pnpm 9.x
  • Docker Desktop
  • HAIP version: latest commit as of April 22, 2026

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions