I have my portfolio site build with NextJS App directory deployed on Netlify. The page for a specific blog post gets to 500 Internal server error on reloading the page. However it works locally and on running with npx netlify-cli serve
Note that it works on click and route from inside the page. It does not work on direct navigation or reload though. I’m not sure how to debug this since it does not happen locally.
I checked my logs and the error message did not seem to indicate the link you mentioned. Adding error message here:
ERROR MissingStaticPage [Error]: Failed to load static file for page: /404 The “listener” argument must be of type function. Received an instance of Object
This error must be fixed but it isn’t supposed to be a 404 page in the first place.
I tried setting the environment variable as mentioned in the page you have mentioned in your post through the Netlify CLI. But now the build fails with this error:
Invalid AWS Lambda parameters used in this request
May be I was looking in the wrong place then, sorry.
I see the solution to this problem as listed in the thread is to set __NEXT_PRIVATE_PREBUNDLED_REACT= next. I have done this in my site, however now the build fails with Invalid AWS Lambda parameters used in this request. Can you help me out with this?
Please check out the entire thread, we’ve said this is not the solution and the actual solution is being worked upon. If we have to repeat the entire discussion here, it’s just creating a duplicate, which won’t help anyone
If you’re desperate to solve this now, you can check out the workaround shared by another user:
If it’s not urgent, you can wait till we get to a long-term solution.
You can probably also downgrade Next.js to 13.2 I believe.