Skip to content

[Bug]: Netlify doesn't use custom Next.js error page #828

@rettgerst

Description

@rettgerst

Steps to reproduce

  1. Create a Next.js custom error page in pages/_error.tsx
  2. Deploy to Netlify
  3. Open the deployed site
  4. When an error occurs, Netlify returns a JSON-serialized error message as plaintext instead of the custom error page.

image

image

You can clone the repro repository and run npm run build && npm run start to see the intended behavior - Next.js renders the custom error page.

A link to a reproduction repository

https://github.com/rettgerst/netlify-error-repro

Plugin version

3.9.2

More information about your build

  • I am building using the CLI
  • I am building using file-based configuration (netlify.toml)

What OS are you using?

No response

Your netlify.toml file

No response

Relevant log output (or link to your logs)

https://app.netlify.com/sites/condescending-brown-669e11/deploys/619bbd24a20c2c2bb4419303

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions