Breaking change in 2.9: listening server on server.hmr.port
See original GitHub issueDescribe the bug
We have a bit of a special setup: instead of Vite proxying our server, we proxy to Vite via our server. We do this using a config that has a section looking like this:
server: {
port: 5588,
hmr: {
port: 3001,
},
},
This makes the in-app Vite client contact a server on port 3001, and this has been working fine up until now. But with the 2.9 upgrade, suddenly Vite itself started a listening IPv6 port on server.port. This is new, and conflicts with our setup. I am not sure of a workaround.
Reproduction
https://github.com/fatso83/issue-reproductions/tree/master/vite-2.9-server.hmr.port
System Info
System:
OS: Linux 5.13 Ubuntu 21.10 21.10 (Impish Indri)
CPU: (12) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 18.41 GB / 31.32 GB
Container: Yes
Shell: 5.1.8 - /bin/bash
Binaries:
Node: 16.14.0 - /usr/local/bin/node
Yarn: 1.22.5 - ~/.yarn/bin/yarn
npm: 8.3.1 - /usr/local/bin/npm
Browsers:
Chrome: 100.0.4896.60
Firefox: 98.0.2
npmPackages:
@vitejs/plugin-react: ^1.3.0 => 1.3.0
vite: 2.9 => 2.9.1
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Changelog | Meteor API Docs
Fix issues with HMR and meteor build --debug PR ... Changes to keep everything compatible with MongoDB Server 5.x and MongoDB Node.js driver...
Read more >Server Options | Vite (main branch)
Specify which IP addresses the server should listen on. ... Note if the port is already being used, Vite will automatically try the...
Read more >oiO - River Thames Conditions - Environment Agency - GOV.UK
Tsp problem, 20611 rvu, Century break snooker 2012, Aadhaar based ... 2014 mercedes benz s65 amg 4matic, Teamspeak server cost, Strada frosa sarandy...
Read more >How To Setup Your React Project With ESBuild From Scratch
#!/bin/bash node esbuild.js; # Expected Output: # Listening on port: 3000 ... dist -p 8000; # Expected Output: # Starting up http-server, serving...
Read more >Release Notes - Nuxt
server. #8593 Fix HMR issue with serverMiddleware when router.base is set. babel. #8545 Enable polyfilling of proposal core-js features.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, sorry @fatso83, we updated an env dir change in the changelog and got these mixed up 👀 I agree with you, this should be documented in the Changelog and in the
hmr.port
config. Let’s talk in #7545 and do it once it is clear that this is what is expected谢谢谢谢,对我有帮助