Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred prerendering page "/500" #23541

Closed
OlehDutchenko opened this issue Mar 30, 2021 · 2 comments · Fixed by #23586
Closed

Error occurred prerendering page "/500" #23541

OlehDutchenko opened this issue Mar 30, 2021 · 2 comments · Fixed by #23586
Labels
bug Issue was opened via the bug report template.

Comments

@OlehDutchenko
Copy link
Contributor

What version of Next.js are you using?

10.1.1+

What version of Node.js are you using?

15.1.0

What browser are you using?


What operating system are you using?

Windows

How are you deploying your application?

next build

Describe the Bug

On building app faced with error

Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Error for page /_error: pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export
...
> Build error occurred
Error: Export encountered errors on following paths:
        /500
        /en/500
        /ru/500
        /uk/500

Expected Behavior

No errors, because I have no /500.tsx file,
I have only /_error.tsx with getServerSideProps

To Reproduce


At 10.0.7 version - all works fine.
After update to new 10.1.x+ version - got error again like at #22815 (comment)

@OlehDutchenko OlehDutchenko added the bug Issue was opened via the bug report template. label Mar 30, 2021
@OlehDutchenko
Copy link
Contributor Author

https://nextjs.org/docs/messages/gssp-export

I am not using next export only next build

@kodiakhq kodiakhq bot closed this as completed in #23586 Jun 11, 2021
kodiakhq bot pushed a commit that referenced this issue Jun 11, 2021
This prevents unexpected errors occurring from users leveraging `getServerSideProps` in `_error` with the new `/500` prerendering as we are currently only checking for a custom `getInitialProps` in `_error` since it opts out of the static optimization although `getServerSideProps` also opts out of the optimization. 

Fixes: #23541
Fixes: #23128
Fixes: #23541
Fixes: #24206

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
janicklas-ralph pushed a commit to janicklas-ralph/next.js that referenced this issue Jun 11, 2021
…23586)

This prevents unexpected errors occurring from users leveraging `getServerSideProps` in `_error` with the new `/500` prerendering as we are currently only checking for a custom `getInitialProps` in `_error` since it opts out of the static optimization although `getServerSideProps` also opts out of the optimization. 

Fixes: vercel#23541
Fixes: vercel#23128
Fixes: vercel#23541
Fixes: vercel#24206

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
flybayer pushed a commit to blitz-js/next.js that referenced this issue Jun 16, 2021
…23586)

This prevents unexpected errors occurring from users leveraging `getServerSideProps` in `_error` with the new `/500` prerendering as we are currently only checking for a custom `getInitialProps` in `_error` since it opts out of the static optimization although `getServerSideProps` also opts out of the optimization. 

Fixes: vercel#23541
Fixes: vercel#23128
Fixes: vercel#23541
Fixes: vercel#24206

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants