Skip to content

Commit 8df2b2f

Browse files
committed
fix(dev): stop the startup reporter when init fails before ready
1 parent 86b6912 commit 8df2b2f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/nuxt-cli/src/dev/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,10 @@ export async function initialize(devContext: NuxtDevContext, ctx: InitializeOpti
369369
}
370370
finally {
371371
// Nuxt being ready ends startup for this process but not for whoever is
372-
// waiting on the first render, so the reporter stays subscribed.
373-
if (!reporter || devServer.progress.snapshot?.serving !== false) {
372+
// waiting on the first render, so the reporter stays subscribed. Any state
373+
// other than ready-but-not-serving has nothing left to wait for.
374+
const snapshot = devServer.progress.snapshot
375+
if (!reporter || snapshot?.status !== 'ready' || snapshot.serving) {
374376
stopReporting()
375377
}
376378
else {

0 commit comments

Comments
 (0)