-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Try deleting the |
Beta Was this translation helpful? Give feedback.
-
This often happens when you are trying to use I can't reproduce though. You don't need |
Beta Was this translation helpful? Give feedback.
-
OK! So, a little background followed by "the answer"... BackgroundTSX/JSX Files, HTML Render Templates in Our ProjectOur project is intended to be an API server ONLY. We only intentionally serve ONE HTML page on the frontend: the index page which can be reached directly from We do have ONE
Our Project's HTTP Code Based RESTful API Error HandlingThe second part of the cause for my From the SO Answer:
A Note About Our SolutionThis is really specific to our use case (as described hereabove). The solution I've put in place, if I understand correctly, is essentially disabling static page generation for all Error pages and pretty much any future page because our both our Root Layout ( Solution Part 0:A precursor to getting things to function again was upgrading from Another unknown factor in the solution may be that I migrated from Exporting page handlers in
Solution Part 1: Update TSX files so that the compiler knows they will be dynamically rendered.Ensure the Next.js compiler/page renderer is informed that all pages are going to be dynamically rendered by the server on request. This works for us because our server is an API-only server (other than the home/index page as I've mentioned). We only have a few TSX files (listed below again) and all of them have been updated to "force dynamic" compilation:
|
Beta Was this translation helpful? Give feedback.
OK! So, a little background followed by "the answer"...
Background
TSX/JSX Files, HTML Render Templates in Our Project
Our project is intended to be an API server ONLY. We only intentionally serve ONE HTML page on the frontend: the index page which can be reached directly from
https://our-domain.com
- the HTML on this page only verifies that the server is running:We do have ONE
*.tsx
files that is used to render an HTML page which we feed to Puppeteer in order to generate a download-able PDF file. That's it. All other*.tsx
files are related this functionality and only exist because I've found that they need to in order for the project to compile successfully:src/app/layout.tsx
src/ap…