Error on calling plugins/index.js to Cypress 10 version

Viewed 197

I am trying to import plugins/index.js to the new structure of Cypress 10 but unfortunately it is not working.

enter image description here

File Structure: enter image description here

1 Answers

Looks like the folder structure is a little bit different to the out-of-the-box setup.

Based on the paths shown in the screenshot, I would guess you need to adjust the line with the error to

return require('../../../cypress/plugins/index.js`)  

If it's still not working, take a look at the file structure to see what relative path is needed.

If still can't get it, post the file structure of the project up in the question.

Related