Why is Next.js error 500 and how do I fix it?
And this ready-made solution is called Next.JS
The production documentation contains the following information:
And this is the essence of the question, the problem is that if there is another folder in the
"pages"folder with .js files
or a page with GET parameters, then if you intentionally reload the page,
And I'm talking about production, in a developer, such an error can also occur, but more often on a 404 page, at which the build makes a page, which can be seen if you check the assembled "out" folder.
Some pages do not experience these problems, some on the contrary. So I'm actually trying to figure out what's wrong with this nesting ??? How to set up and make sure that this page is in the project?
The question of setting up with a dynamic change of parameters is also annoying. The documentation with this is scarce. I have a theory that there is rewrites for this as I see there are routes and patches.
What is wrong with this Next.JS or am I doing something wrong? And the headache is a redirect to the 404 page if there is no page.
In a development project, everything is ok with this.
If everything is so sad with that, you can switch to Vue or Angular :)
To place the code, please use CodePen or similar tool. Thanks you!