Files
ee76e305cc dx: Include path count in export error message (#89333)
Supersedes https://github.com/vercel/next.js/pull/88910

---
<a
href="https://cursor.com/background-agent?bcId=bc-a05c69b9-7049-4095-8985-761868c63e1c"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/agents?id=bc-a05c69b9-7049-4095-8985-761868c63e1c"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Sebastian "Sebbie" Silbermann <[email protected]>
2026-02-14 20:28:28 +00:00

29 lines
997 B
TypeScript

import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'e2e-utils'
import { join } from 'path'
describe('app-dir-hide-suppressed-error-during-next-export', () => {
let next: NextInstance
beforeAll(async () => {
next = await createNext({
skipStart: true,
files: {
'next.config.js': new FileRef(join(__dirname, 'next.config.js')),
app: new FileRef(join(__dirname, 'app')),
},
})
})
afterAll(() => next.destroy())
it('should not log suppressed error when exporting static page', async () => {
await expect(next.start()).rejects.toThrow('next build failed')
expect(next.cliOutput).toInclude('Page build time error')
expect(next.cliOutput).toInclude('occurred prerendering page "/"')
expect(next.cliOutput).toInclude('Export encountered errors on 1 path')
expect(next.cliOutput).not.toInclude(
'The specific message is omitted in production builds to avoid leaking sensitive details.'
)
})
})