NextJS 14.2.4: SyntaxError: Unexpected token '<' #29685
Labels
stage: awaiting response
Potential fix was proposed; awaiting response
stale
no activity on this issue for a long period
Current behavior
I'm following the step by step guide on how to use Cypress and NextJS from Vercel's documentation. As recommended, I run Cypress against production code, so I run
bun run build && bun run start
before runningbun run cypress:open
. These scrips are defined inpackage.json
as:The issue is that when I run the Cypress test, they fail with the error in the title, and I'm at loss at why that might be. In some similar threads I've seen that this could be due to the fact I'm running Cypress tests against
.tsx
code, but as I'm running them against production code, this shouldn't be the case.Checking the browser console I see the following, but it doesn't help me much to understand why this "plug-and-play" test is failing:
Has anybody run on this in the past and/or know how to troubleshoot it?
Desired behavior
Ideally, this test should work right out of the box, as I'm not testing anything complex, but rather a very simple example.
Test code to reproduce
I'm running the same code as provided in the NextJS example I linked above:
Cypress Version
13.11.0
Node version
20.10.0
Operating System
macOS 14.1.1
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: