https://cypress.io logo
Cypress is running code from a different branch
# i-need-help
m
I've run into a Cypress bug where regardless of what branch I'm on, it's trying to run some cached version of the FE. I've tried the following: Change branches, uninstall and install node modules, change back, repeat Downgrade and upgrade Cypress version Install Cypress globally and clear its cache Restart computer (tried on my mac and PC) I've had this issue before, but it was easy to just restart my PC and everything was fixed, but now, it's only running code from the same branch both computers have access at some point. Here's proof in the image. You can see where it's pointing as the error in the code, but in that opened file, the code is completely different.
l
> Install Cypress globally and clear its cache This bit might complicate things. Do you also have it installed locally? Regardless, for each version (global or folder) installed, I assume you ran
cypress cache prune
? Are you also using the
npx
command to execute all this?
m
No, I have not tried that, but I did have it installed globally and locally.
I did manually delete all the installed versions and started from scratch, so I don't think Prune will do much. I am trying, though.
l
> No, I have not tried that, but I did have it installed globally and locally. If you have some flexibility you might consider uninstalling it globally. Usually it makes more sense to only have it installed locally to the folder. I'm guessing you might be encountering a bug with having both global and local installs, but that's just a guess.
m
Yeah, I did that too. My team is still working on debugging it.
2 Views