-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Component testing broken with NextJS 13.2.1 #25951
Comments
This issue looks to be the same: #25943 |
Hey team! Please add your planning poker estimate with Zenhub @astone123 @marktnoonan @mike-plummer @warrensplayer @ZachJW34 |
Thanks for the bug report (and tracking down the actual change, by the looks of it!). We will look at this in the next week or so. |
The Next update added a new property to the getBaseWebpackConfig that we utilize for sourcing the Next config. The new They export a loadProjectInfo function that grabs the |
can we have a release with this? |
@OleksiiKachan this will be included in release 12.8.0 which should be released today |
Just updated to 12.8 and I'm getting an error that cypress can't resolve my modules that I import w/ absolute paths:
This was working before our Next 13.2 update... any ideas? |
@franzwarning are you able to share your ts/js config? |
|
@astone123 fixed by adding:
but I shouldn't really have to do that right? idk y'all know better than me! |
@franzwarning my understanding is that you should not have to add the paths to your config, the modules should be resolved using Next 13.2 + Cypress 12.7 and previous ✅ ? |
✅ Next 13.1.6 Cypress 12.7 Hope that helps. |
I had
now all works for me |
I can confirm this is still broken for me too. the tsconfig.json:
|
Looks like our fix didn't work. We will look into this now. |
The version update or the paths workaround didnt work for me. Any updates? **Edit - Adding |
We will be looking into this in the next week or two! Sorry about the wait. |
This doesn't inspire a lot of confidence in the Component testing product 😕 |
I'm sorry this isn't working for you right now. We can definitely add a regression test as part of this fix, so it is less likely to happen in the future. We will take a look next week. If you'd like to take a stab at fixing it before then, I can help with reviewing and releasing the fix. The Next.js specific code is in this file: https://github.com/cypress-io/cypress/blob/develop/npm/webpack-dev-server/src/helpers/nextHandler.ts. Next.js does not expose a public API for their configuration, which is why it can break in a minor version. Any ideas on the correct fix? Should we just add |
I am working on this. It works in Next 13.0.0 but not in 13.2.1. I will debug more, but I think the issue title is a bit of a red herring - I think the breakage was earlier. ✅ 13.1.4 |
@lmiller1990 Thanks for the update and sorry for my slightly snarky response earlier. I didn't realize this was powered by an unsupported NextJS API, so totally understand the challenge. Next is a great platform but their support for testing & CI leaves something to be desired. I'm happy to test a |
@jamesopti all good, no-one likes it when their thing randomly breaks. I updated my post above - I found the issue was introduced in 13.1.7-canary.7. This greatly minimizes the surface area, I am sure we can fix this very soon 👍 You could use the work around for the next week or so, I'm fairly confident we will ship the fix in the next Cypress version. |
Diff... vercel/next.js@v13.1.7-canary.6...v13.1.7-canary.7. Lots of files but mostly static content. Some interesting parts:
Here we go - this grabs the This line was added in Next.js 12.x, but it wasn't actually added to the |
Hi friends, I fixed it! #26399 /cc @jamesopti @OleksiiKachan @yosi1314. You can test it out using a pre-release binary: 6a37c4a#comments Next release is tomorrow, I'll get some 👀 and ✅ so this can make it in 😎 |
Thanks for the fix @lmiller1990 - Looks like a release didn't happen last Monday. Can we expect one today? |
@jamesopti Sorry about the miscommunication, @lmiller1990 was off by one week on our release cadence (and he's in Australia so all the days are off-by-one). Our next release is planned for tomorrow (Tuesday). |
@jamesopti did you try the pre-release? You can start using this right now: bf7771f#comments and then upgrade to the mainline release when it comes out. Those pre-release binaries expire eventually, but it's live for me right now. |
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. |
When exactly can we expect this release? |
Sorry for the wait. We typically release every two weeks on a Tuesday, but it's possible to get off that cadence every now and then, as we are here. This is where the pre-release binaries come in handy. They last for 30 days. Please don't be blocked on your side waiting for the official release, if you need to start using this now, you can switch to the binary that has the fix now (#25951 (comment)), and then switch back to the new version of Cypress when it comes out. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
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:
Desired behavior
Component tests should compile and run using the
tsconfig.json
settings.Possibly related NextJS change/update: vercel/next.js#45455
Test code to reproduce
Run any component test that uses a custom cypress
tsconfig
with NextJS v13.2.1Cypress Version
latest
Node version
v16.3
Operating System
MacOSX And Github Actions Linux
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: