Open speedyankur opened 3 years ago
This is a known issue for a long time. IMO when using vue-cli you should be able to select manually Cypress version. Also Cypress v4 and later support TypeScript natively. However, even if you select TypeScript in vue-cli, the Cypress project is still generated in Javascript.
I recommend deleting the Cypress plugin and adding Cypress manually. This is very easy to do.
This is a known issue for a long time. IMO when using vue-cli you should be able to select manually Cypress version. Also Cypress v4 and later support TypeScript natively. However, even if you select TypeScript in vue-cli, the Cypress project is still generated in Javascript.
I recommend deleting the Cypress plugin and adding Cypress manually. This is very easy to do.
Can you write a small guidance how to run on newest cypress version ?
@trungdang194 it seems to me that currently you have to add your version of Cypress separately. The below example might help.
npm install cypress --save-dev
and then add resolutions section to your package.json:
"resolutions": {
"cypress": "^6.8.0"
},
The good: The above example will use cypress v6 when cypress commands are run.
The bad: Cypress v3 still gets downloaded since it's part of @vue/cli-plugin-e2e-cypress, but v6 will be used in the above case as required. Also in our Gitlab CI, "Unzipping Cypress" v6 takes like 3-4 minutes, which is a disaster.
I noticed that @vue/cli-plugin-e2e-cypress v5 will have the updated version of cypress within. I also started a discussion about this here.
Thanks for the workaround @trainoasis, I now have cypress 7.1.0
working with @vue/cli 4.5.12
.
@timhere @trainoasis Is there a reason to keep @vue/cli-plugin-e2e-cypress
at all when installing Cypress manually?
@vesper8 good question, haven't tried it, but I thought @vue/cli-plugin-e2e-cypress
does some proxy stuff behind the scenes to make Cypress more Vue compatible. (cause why having a plugin if only adding Cypress would work just as well?) If you get to try this, do let me know please, as will I If I find the time.
Version
4.5.8
Environment info
Steps to reproduce
vue add @vue/cli-plugin-e2e-cypress
What is expected?
@vue/cli-plugin-e2e-cypress should latest version of cypress i.e 5.4.0
What is actually happening?
@vue/cli-plugin-e2e-cypress is still using cypres 3.8