https://cypress.io logo
Cypress Tasks Failing Suddenly
# i-need-help
c
My Cypress tests are suddenly failing at trying to run tasks that have worked up until today. The tasks were built in a plugins/index.js file and looks like they were imported to the new config when they migration happened. But these tests and tasks worked on the version of cypress I have installed for what it’s worth. I’ve tried updating my version of Cypress locally as well but no dice. Was there a breaking change to how these tasks are set up and I need to address perhaps? Didn’t see it in the change log but perhaps I missed something.
And sorry for the bad screenshots. I don’t have Discord access on this computer. 😅
c
it's been a little bit since I have done this, but doesn't the task need to be setup in the config file? within the setupNodEvents block? https://docs.cypress.io/api/commands/task#Usage
and you say " imported to the new config when they migration happened." what migration?
c
There was a change in the config file at some point. When we updated Cypress it tossed our old plugins/index.js file into the config with those comments in my second screenshot.
c
So it sounds like you upgrading from 9.xx to 10.xx, is that right? If so then cypress from 10.xx and up doesn't have a plugins file anymore and that info is now in the config file. https://docs.cypress.io/guides/references/migration-guide#Plugins-File-Removed There are some other changes that might have messed things up to - I would check out the migration docs for whichever version you migrated to.
c
I’ll check out that doc! Thank you.
c
np
5 Views