core
core copied to clipboard
Help about realtime
I renewed the NuxtHub token and enabled realtime as in the documentation. When I enter the website, I get a 404 error. Is there a config I'm missing or something?
Could you please share a reproduction / video, quite hard to help you with few informations
nuxt.config.ts
hub: { database: true, workers: true, blob: true, kv: true, },
nitro: { experimental: { websocket: true, }, },
I enable realtime and i have a minimal websocket handler in server/api/websockets/chat.ts
After this i got error from nuxt/seo ogimage
10:07:24.387 [info] [nitro] Building Nuxt Nitro server (preset: cloudflare-durable, compatibility date: 2025-01-28) 10:08:18.411 [error] [nitro] Error: Cannot resolve "./resvgjs.android-arm-eabi.node" from "/opt/buildhome/repo/node_modules/@resvg/resvg-js/js-binding.js" and externals are not allowed!
And i disable og image for quick fix
ogImage: { enabled: false, },
Error gone but my website 404
https://github.com/user-attachments/assets/bd6a94d5-27ce-427e-8e7c-43b507a9368c
Having the same error:
Run nuxt-hub/action@v1
with:
project-key: noction-parking-5k16
directory: dist
hub-url: https://admin.hub.nuxt.com/
env:
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
Deploying noction-parking to production environment...
Error: Error while preparing deployment: "Please link a NuxtHub project with the \"worker\" type to deploy with the \"cloudflare_durable\" preset." - [POST] "https://admin.hub.nuxt.com/api/teams/50rayn/projects/noction-parking/production/deploy/worker/prepare": 400 Bad Request
Version: "@nuxthub/core": "0.8.24"
nuxt.config.ts :
compatibilityDate: '2025-01-28',
hub: {
database: true,
workers: true,
},
nitro: {
experimental: {
websocket: true,
tasks: true,
},
scheduledTasks: {
'*/30 * * * *': ['booking:cancel'],
},
},
@50rayn Have you created a new project and selected Workers as the type?
@RihanArfan Yes. I tried a setup like this with Cloudflare Workers. A completely new project with WSS and SSE. Link to the error: https://github.com/50rayn/nuxt-hub-test/actions/runs/14523304770/job/40749064043
You'll need to set hub.workers to true https://github.com/50rayn/nuxt-hub-test/blob/main/nuxt.config.ts#L33
@RihanArfan oki. set to true. On the next deployment it fails,
Error: Error while publishing deployment: "Actor migration tag precondition failed, got tag '' when expected tag is 'v1'. Please make sure the tags match and try again." - [POST] "https://admin.hub.nuxt.com/api/teams/50rayn/projects/nuxt-hub-test/production/deploy/worker/complete": 412 Precondition Failed
On life is the last, and the only successful deployment :D https://nuxt-hub-test.soryngitlan.workers.dev.
We've rolled out some improvements to Durable Object migrations which was sometimes causing this. Can you check whether everything is working now?
I still get 404 error, my environment is preview and zero trust is active
- Operating System: Darwin
- Node Version: v22.12.0
- Nuxt Version: 3.15.4
- CLI Version: 3.21.1
- Nitro Version: 2.10.4
- Package Manager: [email protected]
- Builder: -
- User Config: modules, i18n, wellKnown, app, runtimeConfig, $production, security, routeRules, sitemap, compatibilityDate, icon, turnstile, svgo, imports, hub, nitro, image, typescript, colorMode, ogImage, devtools, fcm
- Runtime Modules: @zadigetvoltaire/[email protected], @vueuse/motion/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @vee-validate/[email protected], @nuxtjs/[email protected], @bg-dev/[email protected], @nuxtjs/[email protected], [email protected], [email protected], @nuxtjs/[email protected], @nuxt/[email protected], @nuxthub/[email protected], [email protected], @nuxt/[email protected], @tresjs/[email protected], @nuxt/[email protected], @nuxtjs/[email protected], @vueuse/[email protected], [email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxtjs/[email protected], @pinia/[email protected], @nuxt/[email protected], [email protected]
- Build Modules: -
"dependencies": { "@nuxt/content": "2.13.4", "@nuxt/fonts": "^0.10.3", "@nuxt/image": "^1.9.0", "@nuxt/scripts": "0.9.5", "@nuxthub/core": "^0.8.25", "@nuxtjs/color-mode": "3.5.2", "@nuxtjs/device": "3.2.4", "@nuxtjs/fontaine": "^0.4.4", "@nuxtjs/i18n": "^9.5.2", "@nuxtjs/seo": "2.0.0-rc.23", "@nuxtjs/turnstile": "0.9.11", "@pinia/nuxt": "^0.7.0", "@tawk.to/tawk-messenger-vue-3": "^1.0.3", "@tresjs/cientos": "^4.1.0", "@tresjs/nuxt": "3.0.7", "@tsndr/cloudflare-worker-jwt": "^3.1.3", "@unovis/ts": "^1.5.1", "@unovis/vue": "^1.5.1", "@vee-validate/nuxt": "^4.15.0", "@vee-validate/zod": "^4.15.0", "@vueuse/motion": "^2.2.6", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cobe": "^0.6.3", "drizzle-orm": "^0.38.4", "embla-carousel-vue": "^8.5.2", "fcm-cloudflare-workers": "^2.0.0", "i18n-iso-countries": "^7.14.0", "jspdf": "^2.5.2", "jspdf-autotable": "^3.8.4", "lodash": "^4.17.21", "motion-v": "^0.11.0-beta.4", "nuxt": "^3.15.4", "nuxt-auth-utils": "0.5.7", "nuxt-security": "^2.1.5", "nuxt-svgo": "^4.0.14", "nuxt-vitalizer": "^0.10.0", "pinia": "^2.3.1", "reka-ui": "^2.2.0", "shadcn-nuxt": "^0.10.4", "tailwind-merge": "^3.0.2", "tailwindcss-animate": "^1.0.7", "three": "^0.171.0", "uuid": "^11.0.5", "validator": "^13.12.0", "vaul-vue": "^0.2.1", "vee-validate": "^4.15.0", "vue": "^3.5.13", "vue-router": "^4.5.0", "vue-use-spring": "^0.3.3", "vue3-map-chart": "^0.0.6", "zod": "^3.24.1" }, "devDependencies": { "@bg-dev/nuxt-fcm": "^0.2.14", "@iconify-json/lucide": "^1.2.35", "@nuxt/eslint": "^0.6.2", "@nuxt/icon": "^1.10.3", "@nuxtjs/tailwindcss": "^6.13.1", "@types/lodash": "^4.17.15", "@types/validator": "^13.12.2", "@vueuse/core": "^13.0.0", "@vueuse/nuxt": "^11.3.0", "@zadigetvoltaire/nuxt-well-known": "^0.0.13", "drizzle-kit": "^0.30.4", "eslint": "^9.19.0", "nitropack": "2.10.4", "prettier": "^3.4.2", "typescript": "^5.7.3", "vue-tsc": "^2.2.0", "wrangler": "^3.107.3" }
@RihanArfan looks now works (page).
The only thing which remains, the scheduled tasks don't work, but I think it's not related to real-time topics.
I just upgraded all the deps to the latest version.
Is there any progress?