next.js
166e0ef3 - Fix incorrect 'Ready in' time for next start (#88589)

Commit
55 days ago
Fix incorrect 'Ready in' time for next start (#88589) ## What Fix the incorrect "Ready in" time displayed when running `next start`. The bug caused the time to show impossibly large values like "Ready in 29474457.7min" instead of the actual startup duration. ## Why The `NEXT_PRIVATE_START_TIME` environment variable was not being properly set/propagated when `startServer()` read it. When the variable was missing, the code defaulted to `0`, causing the calculation `Date.now() - 0` to equal the entire Unix timestamp (~1.77 trillion milliseconds ≈ 29 million minutes). ## How 1. Added a fallback in `cli/next-start.ts` to set `NEXT_PRIVATE_START_TIME` if it's not already set by `bin/next.ts` 2. Updated the calculation in `start-server.ts` to use `0` as the duration if `startTime` is falsy, preventing the bug 3. Removed unused performance mark code that was leftover ## Test Plan Run `next start` on a production build and verify the "Ready in" time shows a reasonable value (e.g., "Ready in 523ms" instead of millions of minutes).
Author
Parents
Loading