Open hutchic opened 8 months ago
Possibly related to this Vite issue? https://github.com/vitejs/vite/issues/3737
Apparently middlewareMode: 'ssr'
is deprecated and should just be middlewareMode: true
@Soviut still no joy though that issue looks very closely related
I ran a git bisect reproducing the issue in the playground
and it says https://github.com/nuxt/nuxt/commit/f842da5b905b2a4f0dd28dfa9dfbb51fbb0de3de is the commit at fault
Further narrowed it to the nuxi upgrade from 3.8.4 to 3.9.0
Might be related: https://github.com/nuxt/cli/pull/184/ & https://github.com/nuxt/cli/pull/189
@manniL that looks to have done it.
can / should we ninja edit the relevant docs / CHANGELOG?
FYI was just bitten by this as well in my org, running Nuxt 3.11.2
Even when using the default Vite port I was getting weird errors in the browser as the host was being overridden to localhost
and port was undefined
The env variable NUXI_DISABLE_VITE_HMR
that manniL shared that disables the override behavior did it for me too.
I think we should more explicitly document this behavior as it was pretty obscure to me that the expected default Vite HMR wasn't respected by Nuxt 3 and when trying to configure it myself it was still being overriden by a Nuxt hook, requiring knowledge of this NUXI_DISABLE_VITE_HMR
env var to fix it.
Are we waiting for anything else to have this documented in the official docs?
Any time estimation on when this can be achieved. I've been trying to make HMR work for some weeks and have no clue.
I already set the NUXI_DISABLE_VITE_HMR
and middlewareMode: true
and if I don't set anything else, I receive a ERROR WebSocket server error: Port is already in use
in the dev console. If I try to set a port on vite.server.hmr.port
the error goes away but still no HMR
Environment
Reproduction
Reproduction github PR https://github.com/hutchic-org/nuxt-37-ws/pull/1
expected result
actual result
Describe the bug
The following nuxt.config.ts on 3.7.3 gets a node process active on the port specific by
port
but that's no the case as of 3.7.4Additional context
No response
Logs
No response