cypress: Component testing broken with NextJS 13.2.1
Current behavior
Component tests run fine on NextJS v13.1.1, but fail to compile on v13.2.1
The error received is unable to find module, where the module resolution relies on the tsconfig
basePath setting in /cypress/tsconfig.json
Component test cypress config settings:
component: {
devServer: {
framework: 'next',
bundler: 'webpack',
},
}
Desired behavior
Component tests should compile and run using the tsconfig.json
settings.
Possibly related NextJS change/update: https://github.com/vercel/next.js/pull/45455
Test code to reproduce
Run any component test that uses a custom cypress tsconfig
with NextJS v13.2.1
Cypress Version
latest
Node version
v16.3
Operating System
MacOSX And Github Actions Linux
Debug Logs
No response
Other
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 31 (17 by maintainers)
Hi friends, I fixed it! https://github.com/cypress-io/cypress/pull/26399 /cc @jamesopti @OleksiiKachan @yosi1314. You can test it out using a pre-release binary: https://github.com/cypress-io/cypress/commit/6a37c4ad0a427d2857964e0d6aab709f5dc281ac#comments
Next release is tomorrow, Iβll get some π and β so this can make it in π
β Next 13.1.6 Cypress 12.7 β Next 13.2.x Cypress 12.7 (when I started following this issue) (I forget what broke the first time β might have been the same issue?) β Next. 13.2.x Cypress 12.8
Hope that helps.
When exactly can we expect this release?
Thanks for pointing out how easy it is to test with these!
I confirmed that this release passes all tests in our suite. Will wait for tomorrows deploy.
This doesnβt inspire a lot of confidence in the Component testing product π
I can confirm this is still broken for me too. the
baseUrl
setting is not being respected.tsconfig.json:
@OleksiiKachan this will be included in release 12.8.0 which should be released today