Skip to content
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

[BugReport] vite ws connect failed #61

Open
warjiang opened this issue Nov 3, 2023 · 5 comments
Open

[BugReport] vite ws connect failed #61

warjiang opened this issue Nov 3, 2023 · 5 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@warjiang
Copy link

warjiang commented Nov 3, 2023

when i use create-chrome-ext with react + ts + vite, after install dependencies and run npm run dev, it comes with websockets connect failed:
image

@Valeriy-Burlaka
Copy link

I had this error too, - looks like Vite regression or a configuration issue. Some people report that downgrading to "vite": "~4.2.2" helped them.
For me, adding Vite configuration from this answer solved the issue. Hope this helps!

@warjiang
Copy link
Author

warjiang commented Nov 6, 2023

@Valeriy-Burlaka thks, after donwgrade vite, it works, and the hmr as well 👍

@warjiang
Copy link
Author

warjiang commented Nov 6, 2023

@guocaoyi maybe should lock version of vite or add this problem in FAQ

@guocaoyi guocaoyi added bug Something isn't working wontfix This will not be worked on labels Nov 7, 2023
@ajaxjs
Copy link

ajaxjs commented Nov 18, 2023

same problem

Try add this to your vite config

server: { port: 5173, strictPort: true, hmr: { port: 5173, }, },

fixed!

@dejurin
Copy link
Contributor

dejurin commented Dec 17, 2023

This bug only in dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants