--url option is not working for plugin cli-plugin-e2e-cypress
Version
3.0.3
Node and OS info
node 8.9.4", npm 6.2.0", Windows 10 (Platform: win32 (10.0.17134))
Steps to reproduce
- Set up a Vue CLI application that uses an external local dev server like IIS (not through
npm run serve) - Add cypress e2e test supported by VueCLI
- Add
"test:e2e": "vue-cli-service test:e2e --url http://localhost:33333"to scripts in package.json - Run
npm run test:e2e
What is expected?
Cypress to run as normal, testing http://localhost:33333
What is actually happening?
I receive the following error:
Error: Command failed: C:\Users\...\node_modules\cypress\bin\cypress open --config baseUrl=http://localhost:33333
Set up a Vue CLI application that uses an external local dev server like IIS (not through npm run serve)
So:
- that server is already running on port 33333 while you start cypress
- you tested it's reachable under that port
- And that server is actually serving your app when you tested 2.?
- ...and it fails as described above,
- while with a dev-server started manually through
yarn serve, the --url option works? Or does it fail with that as well?
Thanks for the swift response,
More info...
I've tried the above on a different set-up: Mac OS, node 10.7.0, npm 6.1.0 with the same versions of Vue CLI and all the plugins... using a remote url through --url works, so I'll close the issue.
Well if this is a windows-related problem we might still be able to do something. But it might also be a Cypress bug.
To... I found something that may or may not be useful: after clearing out node_modules etc... I re-installed everything. I was served the following message:
Cypress 3.1.0 is already installed in C:\Users\...\AppData\Local\Cypress\Cache\3.1.0
The error from the open command that comes from node_modules looks like this:
Command failed: C:\Users\...\node_modules\cypress\bin\cypress open --config baseUrl=http://localhost:33333/
Around the time this stopped working I updated from:
"@vue/cli-plugin-e2e-cypress": "^3.0.0-rc.7",
To:
"@vue/cli-plugin-e2e-cypress": "^3.0.3",
A funny thing about this project, though it shouldn't have a bearing on Cypress, is: we're not using npm run serve. We're building to dist and watching src. This is because our templates are served by an IIS server through x-template script tags, and, quite honestly, because I can't get the devServer proxy to work.
This https://github.com/cypress-io/cypress/issues/5466 seems to be a root cause of the issue