Skip to content

fix: use process.cwd() for package.json path in version.ts#45

Merged
noahsaso merged 1 commit intomainfrom
fix/version-cwd
Apr 14, 2026
Merged

fix: use process.cwd() for package.json path in version.ts#45
noahsaso merged 1 commit intomainfrom
fix/version-cwd

Conversation

@tauagent
Copy link
Copy Markdown
Collaborator

Problem

The 0.3.31 Docker image crashes with:

Error: ENOENT: no such file or directory, open '/app/dist/package.json'

Cause

version.ts uses __dirname to resolve package.json, but tsup bundling changes how __dirname resolves at runtime.

Fix

Use process.cwd() instead, which reliably resolves to /app in the Docker container (the WORKDIR).

__dirname resolves differently when bundled with tsup, causing
the Docker image to fail with ENOENT for /app/dist/package.json.

Using process.cwd() instead, which reliably resolves to /app in Docker.
@tauagent tauagent requested a review from noahsaso as a code owner April 14, 2026 14:19
@noahsaso noahsaso merged commit deb22f1 into main Apr 14, 2026
1 check passed
@noahsaso noahsaso deleted the fix/version-cwd branch April 14, 2026 14:20
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.

2 participants