New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vite dev serve not passing defaults to cypress executor #13944
Comments
Hi @wingy3181 ! I see you are using version Here's the PR that fixed it. #13219 |
@mandarini thanks for the suggestion..... i just tried updating the latest version as per https://nx.dev/core-features/automate-updating-dependencies and the removed the configuration of he host to localhost within the still not workign without it..... If I have sometime I'll see if I can setup a blank workspace to recreate the issue.........it's a bit hard without a failing example |
Hi there @wingy3181 ! Yes please, if you have time, please do make a reproduction. It will be very very helpful for me! :) |
Hi @mandarini,
Unless I am interpreting the docs incorrectly from https://nx.dev/packages/cypress/executors/cypress#providing-a-base-url EDIT: Ah i think i forgot to include the information of what vite's default host is...https://vitejs.dev/config/server-options.html#server-host. So when the vite config host is not provided, vite will default the value to 'localhost'. This is not picked up by the cypress executor as the baseUrl and why it is left as undefined |
Ahhh yeah, that's it! @barbados-clemens do you think we should default to |
It should be on the vite side @mandarini as if no baseUrl is passed nor one in the executor options, @nrwl/cypress falls back to letting cypress resolve the value from the cypress configuration file. So if we always default to localhost, then the value in cypress configuration file will not be able to be used, which we don't want to prevent. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Running
nx run app-e2e:e2e
when using@nrwl/vite
package for build + serving with cypress to execute the e2e testsdoes not pass the baseUrl appropriately to the cypress e2e executor when the vite config does not specify a host under the server key config.
See https://github.com/nrwl/nx/blob/master/packages/vite/src/executors/dev-server/dev-server.impl.ts
Expected Behavior
Should automatically pick up the value from default values for vite config? (See https://vitejs.dev/config/server-options.html)
As per https://nx.dev/packages/cypress/executors/cypress#providing-a-base-url
Github Repo
No response
Steps to Reproduce
nx run app:e2e
and it should fail waiting forNx Report
Failure Logs
Additional Information
No response
The text was updated successfully, but these errors were encountered: