-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
Next.js tries to generate static 500 even with getInitialProps in _app.js #23568
Comments
reporting the same error. And I guess I shouldn't force to use to add /500 if I don't want to? @Timer @timneutkens |
sort of duplicate of #23128 |
Very true, looks like duplicate, didn't see #23128, well I have a repro repo here :) |
According to tests, this is an intended behaviour:
Why is it different from |
I'm having issues with this as well. Seems to me like having the getInitialProps in _app should disable all static loading. I'm not sure why this needs to happen or if there is a way to turn if off. |
@rmsheppard a way to turn it off is to create a custom
|
This seems to be a breaking change from previous version, I've upgraded and ended up with this issue as well as others. |
Closing as a duplicate of #23128 |
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. |
What version of Next.js are you using?
10.1.2
What version of Node.js are you using?
v15.6.0
What browser are you using?
Chrome
What operating system are you using?
macOS 11.1 (M1)
How are you deploying your application?
next build
Describe the Bug
When I try to build an application, it fails on
[= ] info - Generating static pages (0/1)
, because next.js tries to build static 500 page, even thoughgetInitialProps
is present in_app.js
Expected Behavior
500 error should not be statically generated in case
getInitialProps
is present in_app
(since it is said to opt out whole app from ASO).To Reproduce
https://github.com/laSinteZ/nextjs-10-1-error-500 (
npm install
, thennpm run build
)Notice that creating custom
_error.js
page withgetInitialProps
helps (since 500 isn't statically generated in that case I guess).The text was updated successfully, but these errors were encountered: