Skip to content

fix: add --import tsx to den-api node invocation in den-dev compose - #3394

Open
shahtirth07 wants to merge 1 commit into
different-ai:devfrom
shahtirth07:fix/den-dev-missing-import-tsx-3392
Open

fix: add --import tsx to den-api node invocation in den-dev compose#3394
shahtirth07 wants to merge 1 commit into
different-ai:devfrom
shahtirth07:fix/den-dev-missing-import-tsx-3392

Conversation

@shahtirth07

Copy link
Copy Markdown

Summary

  • Adds --import tsx to the node .../den-api/dist/main.js invocation in packaging/docker/docker-compose.den-dev.yml, so den-api can resolve its extensionless source imports when running under OPENWORK_DEV_MODE=1.

Why

  • With OPENWORK_DEV_MODE=1, den-api loads den-db from source rather than the built dist/. ee/packages/den-db/src/schema.ts does export * from "./schema/index" without a file extension, which native Node ESM resolution can't resolve without a loader. The drizzle-kit push step earlier in the same den service command already uses --import tsx for this reason; the second node invocation starting the API server didn't, causing Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../schema/index' and preventing den from starting.

Issue

Scope

  • packaging/docker/docker-compose.den-dev.yml: add --import tsx to the den service's API start step, mirroring the flag already used on the drizzle-kit push step in the same command.

Out of scope

Testing

Ran

  • docker compose -f packaging/docker/docker-compose.den-dev.yml up --build
  • docker compose -f packaging/docker/docker-compose.den-dev.yml run --rm den node --import tsx /app/ee/apps/den-api/dist/main.js (isolated check of the fixed command)

Result

  • pass: ERR_MODULE_NOT_FOUND no longer occurs; den-api starts

CI status

  • pass:
  • code-related failures: none observed locally
  • external/env/auth blockers: none

Manual verification

  1. Applied the --import tsx fix to the den service command
  2. Ran docker compose -f packaging/docker/docker-compose.den-dev.yml up
  3. Confirmed den-api starts without the module resolution error <adjust based on whether Bug 1 blocked you from reaching this point in the full chain, vs. verifying via the isolated run --rm command>

Evidence

  • <paste the relevant log lines showing den-api starting cleanly, or a short terminal recording>

Risk

  • Low — single flag addition to a dev-only docker-compose file, mirrors an existing working pattern in the same command line, no production code changed

Rollback

  • Revert this PR; no schema, migration, or runtime code changes involved

…refs different-ai#3392)

The drizzle-kit push step in the den service command already uses
--import tsx, but the following node invocation running den-api's
dist/main.js didn't. Since OPENWORK_DEV_MODE=1 loads den db from
source, and schema.ts re exports without a file extension, native
ESM resolution fails without the tsx loader.

Does not address the drizzle-kit MySQL index bug also described in
different-ai#3392: that one needs reproduction against the real stack before a
fix is attempted.
@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, v0 Jul 31, 2026 6:13pm

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant