diff --git a/packages/nuxt/src/core/runtime/nitro/dev-server-logs.ts b/packages/nuxt/src/core/runtime/nitro/dev-server-logs.ts index 63b955eae6..b1fd618e00 100644 --- a/packages/nuxt/src/core/runtime/nitro/dev-server-logs.ts +++ b/packages/nuxt/src/core/runtime/nitro/dev-server-logs.ts @@ -25,7 +25,9 @@ export default (nitroApp: NitroApp) => { } onConsoleLog((_log) => { - const ctx = asyncContext.use() + const ctx = asyncContext.tryUse() + if (!ctx) { return } + const stack = getStack() if (stack.includes('runtime/vite-node.mjs')) { return }