I installed del module: https://docs.cypress.io/api/plugins/after-spec-api#Delete-the-recorded-video-if-the-spec-passed
then I configured cypress config but this line:
const del = require('del')
makes that cypress is not working (I cant even select any browser):
When I commented out this line (const del = require('del')), cypress worked normally.
How can I fix it?
- Cypress version: 12.5
- del version: 7.0.0
The latest version of
del
v7.0.0 isn't compatible with the example code Cypress gives.You could downgrade to v6.1.1 and the sample code will run.
I would remove ver 7.0.0 first to be sure you get the older version installed.
You can use ver 7.0.0 and alter the code to use dynamic import.
The newest version also changes the function names to
deleteAsync
anddeleteSync
, so the usage is slightly different.Here's the changes to the Cypress sample code: