Cypress Cloud only: shows the "404" page for NextJS dynamic routes with 'force-static'. How to debug? #28403
Unanswered
IonelLupu
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a NextJS app and a couple of e2e tests. All the tests that hit the pages that are under a dynamic route name and contain
export const dynamic = 'force-static'
return the "not found" page. The same exact page (with the same exact source code) that is not under a dynamic route work correctly in cypress cloud.One note: all the tests pass when running on my local machine.
For example, here is the file tree of my project:
The test suite is very simple:
With all of these, those 3 tests fail to pass on Cypress Cloud only saying the page was not found:
And every page.tsx content is this:
How can I debug this in cypress cloud? I don't have access to the NextJS server to see the logs
Edit
After days of debugging, it seems building the project with NODE_ENV=test is the real issues: vercel/next.js#58935
Beta Was this translation helpful? Give feedback.
All reactions