-
Notifications
You must be signed in to change notification settings - Fork 45
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
Not working for Nestjs with socket #111
Comments
By the way, the socket test runs well with vitest. pnpm run test:vitest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for this great plugin. This works well until I add the socket with Nestjs.
I have a working demo here nestjs-vite-demo.
Socket is working with Nest default cli.
1- Start the server
2- Visit the page localhost:3000. You will see the client page.
![image](https://private-user-images.githubusercontent.com/771703/335853216-69be3a4b-579c-4dc8-8850-928f95fb54f5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NzI1MDksIm5iZiI6MTcxOTU3MjIwOSwicGF0aCI6Ii83NzE3MDMvMzM1ODUzMjE2LTY5YmUzYTRiLTU3OWMtNGRjOC04ODUwLTkyOGY5NWZiNTRmNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOFQxMDU2NDlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hMjJlZTJiNzIxZjI3NjkyNDFkYjQ0MjEzNWM3YmM3OTQ2Y2VkMTUzNjk2ZjNiZTk2ZWE2NTUwZjAyNzcyOWE3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.A7-VI5UdDMzrlEk1DdOTW6uhYnDvBYqBNza2Oi7ex8c)
The status shows the client is connected to the socket server, and you can click
Send Message
to send the message to the server and get the reply from the server.Here are the steps to reproduce the problem.
1- Start the server with vite
2- Visit the page localhost:3000. The client will never connect to the server.
![image](https://private-user-images.githubusercontent.com/771703/335853356-eacf17c4-d105-4117-b847-0774759a3d93.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk1NzI1MDksIm5iZiI6MTcxOTU3MjIwOSwicGF0aCI6Ii83NzE3MDMvMzM1ODUzMzU2LWVhY2YxN2M0LWQxMDUtNDExNy1iODQ3LTA3NzQ3NTlhM2Q5My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOFQxMDU2NDlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mYjlmOTU1Mjk0NWE4N2JmOTc2NWExOTE2YzhkYTBmZGI3YjM4ZWFlODAxZjFlMzBkYmVjNjk1Y2QzMDAxNDBlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.psS1IyAdBVJpWtfTWG3yA-X3AVia5wbOnfPTpkNuLNU)
Possible solution.
#87 I can't get the production build working with Vite. I will report on the other issue as well.
I hope someone can give a hint on how to solve this. Thank you!
The text was updated successfully, but these errors were encountered: