diff --git a/packages/next/server/dev/next-dev-server.ts b/packages/next/server/dev/next-dev-server.ts index a289abd3ea128..5594c252cbd41 100644 --- a/packages/next/server/dev/next-dev-server.ts +++ b/packages/next/server/dev/next-dev-server.ts @@ -801,7 +801,9 @@ export default class DevServer extends Server { const frames = parseStack(err.stack!) const frame = frames.find( ({ file }) => - !file?.startsWith('eval') && !file?.includes('web/adapter') + !file?.startsWith('eval') && + !file?.includes('web/adapter') && + !file?.includes('sandbox/context') )! if (frame.lineNumber && frame?.file) {