Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ yarn-error.*
# local env files
.env*.local
.env
.env.production

# typescript
*.tsbuildinfo
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /repo

COPY package.json yarn.lock ./
COPY scripts ./scripts
COPY patches ./patches

RUN mkdir -p packages/happy-app packages/happy-server packages/happy-cli packages/happy-agent packages/happy-wire

Expand Down
1 change: 1 addition & 0 deletions packages/happy-server/sources/standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ async function migrate() {
let migrationsDirResolved = "";
const candidates = [
path.join(process.cwd(), "prisma", "migrations"),
path.join(__dirname, "..", "prisma", "migrations"),
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/happy-server is ESM ("type": "module"), so __dirname is not defined at runtime. This will throw a ReferenceError when migrate() runs under tsx. Please derive the directory from import.meta.url (as done elsewhere in the repo) or otherwise compute the module directory in an ESM-safe way before using it in the candidates list.

Copilot uses AI. Check for mistakes.
path.join(path.dirname(process.execPath), "prisma", "migrations"),
];
for (const candidate of candidates) {
Expand Down
Loading