Open ydnar opened 1 year ago
I experience the same issue, have you found a workaround?
We are having the same problem, nuxt is running on a remote development server and local browser can't connect to the websocket.
Hello, can you provide a set up to reproduce this issue?
I came across the same problem. For whoever this may be useful: adding this to your nuxt.config.ts (inside defineNuxtConfig
's parameter object) disables the content watch, in case you don't really need it and want to get rid of the endless loop of websocket errors:
content: {
watch: false,
},
Environment
Darwin
v19.5.0
3.1.1
2.0.0
pnpm@7.26.2
vite
modules
,vite
,runtimeConfig
,css
,app
,hooks
,content
,i18n
@nuxt/content@2.4.2
,@nuxtjs/i18n@8.0.0-beta.9
-
Reproduction
View any Nuxt server in development from another device. Watch the Websocket try and fail to connect, repeatedly.
Describe the bug
The Websocket URL is hard-coded to use
localhost
as hostname, which means when testing from another device, the Websocket tries to connect and fails repeatedly, spamming the console.The issue is here: https://github.com/nuxt/content/blob/5f1c1349af774f10b26d250c1cc621f4b9912243/src/module.ts#L657
Additional context
No response
Logs
No response