Skip to content

Fix node backend crash on fresh clone: migrate in start script + Express 5 - #88

Merged
VishalAtIntercom merged 1 commit into
mainfrom
vv/node-start-migrations-express5
Jul 20, 2026
Merged

Fix node backend crash on fresh clone: migrate in start script + Express 5#88
VishalAtIntercom merged 1 commit into
mainfrom
vv/node-start-migrations-express5

Conversation

@VishalAtIntercom

Copy link
Copy Markdown
Contributor

Why?

script/node/start never ran db:migrate, so on a fresh clone the server booted against an empty SQLite file and the first database query crashed the whole process. Express 4 does not forward rejected promises from async route handlers to the error middleware, so any Sequelize error became an unhandled rejection and killed the server.

How?

Run migrations in the start scripts (bash and Windows), and upgrade Express 4 → 5, which forwards async handler rejections to the error handler so a DB error returns a 500 instead of exiting the process (@types/express was already on v5).

Generated with Claude Code

script/node/start never ran db:migrate, so on a fresh clone the server
booted against an empty SQLite file and the first query crashed the
process with an unhandled rejection (Express 4 does not forward async
handler rejections to the error handler).

- Add pnpm db:migrate to script/node/start and start.bat
- Upgrade express 4 -> 5 so async handler errors return 500 instead of
  killing the process (@types/express was already on v5)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​express@​5.2.19710010087100

View full report

@VishalAtIntercom
VishalAtIntercom merged commit a6f233b into main Jul 20, 2026
3 checks passed
@VishalAtIntercom
VishalAtIntercom deleted the vv/node-start-migrations-express5 branch July 20, 2026 16:18
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