Skip to content

Fix/db sync in dev mode & Fix/closeContainer undefined when RUNTIME_TYPE is not 'local-docker' #75

Open
SophiaJiaLi wants to merge 2 commits intohexdocom:mainfrom
SophiaJiaLi:fix/db-sync-in-dev-mode
Open

Fix/db sync in dev mode & Fix/closeContainer undefined when RUNTIME_TYPE is not 'local-docker' #75
SophiaJiaLi wants to merge 2 commits intohexdocom:mainfrom
SophiaJiaLi:fix/db-sync-in-dev-mode

Conversation

@SophiaJiaLi
Copy link
Copy Markdown

@SophiaJiaLi SophiaJiaLi commented Mar 2, 2026

Problem1: When running in dev mode (pnpm run dev), sync.js is never called, leaving the database empty. All API calls fail with SQLITE_ERROR: no such table.

Root cause: sync.js is only called in main.js (Electron entry), not in bin/www (Node dev entry).

Fix: Call sync() in bin/www before server.listen() to ensure tables are created on startup.

Problem: When running in dev mode (pnpm run dev), sync.js is never called, leaving the database empty. All API calls fail with SQLITE_ERROR: no such table.

Root cause: sync.js is only called in main.js (Electron entry), not in bin/www (Node dev entry).

Fix: Call sync() in bin/www before server.listen() to ensure tables are created on startup.
@SophiaJiaLi SophiaJiaLi changed the base branch from develop to main March 2, 2026 13:46
… closeContainer was only assigned inside the if branch for 'local-docker', leaving it undefined in docker and other runtime modes. Added else branch to assign a no-op async function as fallback.

closeContainer was only assigned inside the if branch for 'local-docker',
leaving it undefined in docker and other runtime modes. Added else branch
to assign a no-op async function as fallback.
@SophiaJiaLi
Copy link
Copy Markdown
Author

Problem2: closeContainer was only assigned inside the if branch for 'local-docker',
leaving it undefined in docker and other runtime modes.

Fix: Added else branch to assign a no-op async function as fallback.

@SophiaJiaLi SophiaJiaLi changed the title Fix/db sync in dev mode Fix/db sync in dev mode & Fix/closeContainer undefined when RUNTIME_TYPE is not 'local-docker' Mar 2, 2026
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