API
Answered
David L. Bowman posted this in #help-forum
Next.js doesn't work with Cypress out-of-the-box anymore (recommended documentation).
3 Replies
The newest version of Next.js isn't compatible with Cypress out-of-the-box. You need to change the value of
This isn't reflected on the Next.js documentation https://nextjs.org/docs/pages/building-your-application/optimizing/testing, although is reflected in the
Do you know how I can reach out to someone at Next's team for Documentation?
"moduleResolution":
from "bundler"
to "node"
in tsconfig.json
.// tsconfig.json
"module": "esnext",
"moduleResolution": "node", // Cypress requires bundler => node
This isn't reflected on the Next.js documentation https://nextjs.org/docs/pages/building-your-application/optimizing/testing, although is reflected in the
--example with-cypress with-cypress-app
https://github.com/vercel/next.js/blob/canary/examples/with-cypress/tsconfig.json. I also needed to add "baseUrl": "./"
to my "compilerOptions": { ... }
in tsconfig.json
.Do you know how I can reach out to someone at Next's team for Documentation?
i think the best way here is to open a github issue
Answer
Perfect, thank you @joulev . I've added it here https://github.com/vercel/next.js/issues/55281.