-
Notifications
You must be signed in to change notification settings - Fork 97
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
Unable to run tests with Vite dev server #294
Comments
The error seems to be coming from the fact that Vite responds with 404 for HEAD requests
I've switched to GET probing, but doesn't solve the issue. ( I've narrowed it down to |
It turns out the problem is with the default |
🎉 This issue has been resolved in version 1.12.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Is it correct that this still needs to use I would gladly add a mention in addition to webpack-dev-server in the README if that’s the case. |
We have Vite 3.2.2 and start-server-and-test 1.14 and the exact same issue. Tests start too early. Any tips how to solve this? |
As a workaround we use to build it first, and then |
I would suggest opening a new issue with reproduction and trying to see what the tool does via |
@bahmutov isn't it obvious? When using vite dev server the following happens:
|
Well if this is so simple then it looks to be the Vue / Vite problem, no? They serve pages before they are ready I guess. |
It's not a vite problem but a problem with
See also jeffbski/wait-on#109 (comment) |
Did you try starting vite with See https://vitejs.dev/config/server-options.html#server-host |
@MikeMcC399 No, just
Could well be that my setup is buggy, since I'm new to vite and in the process of changing over from Create-React-App |
Hi @gottfired. |
I'm not exactly sure why but @MikeMcC399's suggestion of using
|
I just had a similar issue after upgrading to vite 5.0.0 (it previously worked fine with v4.5.0). My fix (after a lot of trial and error was to add This is now my
|
After upgrading to vite 5.0.0, I have got the same problem. (it worked fine with v4.5.0). @edant92's suggestion work for me. |
edit: fwiw this seems to be fixed in 5.0.2 (see vitejs/vite#15059 and vitejs/vite#15025 for fixes, and related issues vitejs/vite#9520 and vitejs/vite#15022 for why
same here. huge thanks to @edant92 for their |
I can also confirm this is fixed in 5.0.2 and the |
Edit: Make sure you have an index.html! |
I'm on depending on your build tool, what is the output of npm ls vite
yarn why vite
pnpm why vite |
My mistake, I had deleted my index.html since typically, our entry point is a .tsx file. 🤦 I'll edit my previous comment! |
I have a Vite dev server running on port 3000 with a functioning application. Running the e2e tests in a separate thread works fine. But together run by
start-server-and-test
it stucks after starting the Vite server.My package json setup:
Reproduction: In my https://github.com/blacksonic/vue-3-playground repository run:
npm run test:e2e:javascript
The text was updated successfully, but these errors were encountered: