aldrine00
aldrine00

Reputation: 97

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

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

Upvotes: 2

Views: 2566

Answers (1)

Fody
Fody

Reputation: 31904

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.

Upvotes: 2

Related Questions