All jobs

Upgrade an Express App to Node 24

An agent pins an Express app to Node 24 in .nvmrc, engines, the Dockerfile and a new CI workflow; the build passes and unit tests fail exactly as on Node 22.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent inventories the runtime first. In gothinkster/node-express-realworld-example-app there was no .nvmrc, no engines field, no .github/workflows, no .node-version or .tool-versions, and the Dockerfile used the moving tag node:lts-alpine. It added .nvmrc (24), engines >=24 <25 in package.json and package-lock.json, node:24-alpine, and .github/workflows/ci.yml.

The workflow runs npx prisma generate explicitly rather than rely on @prisma/client's install script, which npm 11, bundled with Node 24, lists as not covered by allowScripts. And npm install --package-lock-only pruned unrelated lockfile entries, so it reverted that and added the engines lines by hand.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Upgrade this Express project to Node 24. Inventory runtime declarations, .nvmrc, package.json engines, CI workflows, Dockerfiles and the package lockfile; explicitly report absent files. Align existing pins and add explicit runtime settings where needed. Install under Node 24, record Node and npm versions, generate Prisma, run tests and build, and verify development and built application startup. Build and exercise the Docker image. Inspect e2e prerequisites and distinguish pre-existing failures from runtime regressions. Update existing CI to run the checks on Node 24; if no workflow exists, add one for this verification and explain its service requirements. Fix demonstrated compatibility problems without unrelated upgrades. Open a pull request listing each change, command output and any checks that remain blocked.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

Tried on gothinkster/node-express-realworld-example-app at 30b68e1: 5 files changed, 42 insertions(+), 1 deletion(-). npx nx build api exited 0 on Node 22 before and on Node 24.22.2 after, ending Successfully ran target build for project api. Unit tests are the same on both: Tests: 7 failed, 1 todo, 19 passed, 27 total, all 7 in auth.service.test.ts, which imports the real Prisma client before the mock loads. The built app started and answered /. The e2e test failed after the change and was not run before; it expects Hello API where the app returns API is running on /api. nx lint api failed after the change on no-explicit-any errors and was not run before, so whether that predates the change is unknown. Docker was not installed, so no image was built. No pull request was opened.

For the reviewer: whether to fix auth.service.test.ts, the stale e2e expectation and the Dockerfile's missing prisma generate, none of them Node 24 problems; until the first is fixed the new CI is red. And whether <25 should block Node 25.

Run it on every Monday morning until the upgrade merges

An automation with a schedule trigger, cron 0 9 * * 1, runs this prompt weekly until the upgrade merges; then switch it off.

The use case this job follows, with its automation and trigger: Upgrade dependencies weekly.

Why run it on Rush?

The identical 7 failures on Node 22 and Node 24 show the runtime change broke none of the unit tests or the build. The run also kept the change small: when npm install --package-lock-only pruned unrelated lockfile entries, it reverted that and wrote the engines lines by hand.

Frequently asked questions

Does the Docker image work on Node 24?

Not shown. Docker was not available. Simulating the Dockerfile's production install on a copy of dist/api crashed with @prisma/client did not initialize yet on both Node 22 and 24, because dist has no Prisma schema.

Why does the new CI start no Postgres?

Generate, build and startup need only DATABASE_URL set. The auth tests would need a migrated database and may still fail, which the workflow's comment says.

More Express jobs

The same job on other stacks

More jobs like this: Upgrade dependencies weekly

Keep reading