Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Publish a message on websocket from another endpoint

Hello, I am using NuxtHub and enabled experimental websockets from Nitro and workers from NuxtHub. I have an endpoint server/api/ws.ts: ...

How to export types of an nuxt plugin?

So i'm using the better-auth, and for the client part, i created a nuxt plugin like this: ```js import { createAuthClient } from "better-auth/vue"; export default defineNuxtPlugin(() => { const authClient = createAuthClient({});...

useUserSession() blank for one user

I am using nuxt-auth-utils to manage login and authentication in an app. When the user logs in we store data in user using setUserSession() and then check some of those values in the authentication middleware. This appears to work fine ... except for one user. For that user, we run setUserSession() on the server side, but when we then request the session with useUserSession() their session is blank. This happens regardless of whether I refresh the session with refresh or not. It feels like the session is simply not saved on the server side, or not passed to the client even after a refresh and route change. I have been wondering if the total size of the stored data (including the secure part) could have any impact on whether the session saves or not, and whether that's something we can alter?...

Missing "./runtime" specifier in "@nuxt/image" package

Hello. I want to create a custom provider for @nuxt/image. I use instructions from https://image.nuxt.com/advanced/custom-provider My custom provider is: ```typescript import { joinURL } from 'ufo'...

Nuxt UI - How to use a reactive array as NavigationMenu children?

I have a reactive object. I want to map it as a reactive array to NavigationMenu children array. How to keep reactivity?

VS Codium - Saving .vue file adds imports outside of <script>

Has anyone had the problem of any imports you have within a <script> in a .vue file, on saving the file the imports get duplicated outside of the <script>? I believe this has been happening ever since upgrading our Nuxt app to v4 but I'm not sure that's related. VS Codium is basically unusable because it's impossible to save a .vue file without this happening. ...

pnpm build - Error

Hey guys, Im facing a weird error and i dont get far. When i want to use pnpm build it loads like 20 years and it gives me a weird error. ...

Creating a module that depends on another module and include it's typings

I want my module to depend in a module, such as the i18n module, and I want to be able to register some plugins that call useNuxtApp() to then use $i18n, but the problem is that despite having the i18n module in peer-dependencies, I don't get any type coverage. How do I achieve this?

nitro devProxy ERR_CONTENT_DECODING_FAILED

Have something changed in the nitro devProxy between Nuxt 4.1.2 => 4.1.3? I have a devProxy to communicate with a instance of TypeSense when developing. It stopped working when i upgraded to Nuxt 4.1.3 from 4.1.2. There is a Health-path in TypeSense, and when i try to reach that in browser or postman i get an net::ERR_CONTENT_DECODING_FAILED status....

Cookie Reactivity Issue

Hi, I have this cookie defined in my composable: ```ts export function useSession() { const currentPortfolioId = useCookie<number | undefined>('currentPortfolio', { maxAge: 60 * 60 * 24 * 14...

How to test errors (createError) in validate function? (@nuxt/test-utils + @testing-library/vue)

I would like to integration test this part of my nuxt 3 page: ```ts definePageMeta({ validate: async (route) => { if (!route.query.code || !route.query.email) {...

Trying to install Tailwind nuxt module inside my own module but it's not working

Good morning/afternoon/evening! I've been struggling with this tailwind problem for some days, would be great if someone had some advice about it. I have a custom nuxt module at my company that works just fine. We now want to install Reka UI in order to use their components inside our project. I was able to install Reka Ui and the component's behaviour are ok but when I try to install tailwind to use their custom classes it does not work. Details:...

Docs template with Nuxt & NuxtUI 4

Hi, Is the Docs template working. I tried last night real quickly to install the latest but got a bunch of errors in Docs template with the latest Nuxt and NuxtUI. Using NPM as package manager. Will try tomorrow again, but just checking if it's just me?...

Vue/Nuxt SSR `onServerPrefetch` timing issue

Context In a Nuxt 4 / Vue 3 SSR app, I have data that is fetched in a child component’s onServerPrefetch() and written into a shared state (useState('page-context')). ...

Logging in server route

I wanted to log in server routes but trying to import @nuxt/kit throws
[nitro] ERROR RollupError: [plugin impound] This module cannot be imported in server runtime. [importing @nuxt/kit from server/api/showcases.post.ts]
[nitro] ERROR RollupError: [plugin impound] This module cannot be imported in server runtime. [importing @nuxt/kit from server/api/showcases.post.ts]
...

Unknown schema vendor

Why am I getting this error when starting nuxt? I have not changed anything about thecontent plugin

Handling old browser versions after deployment

Hey *, we are facing issues due to browsers out in the wild running on older versions of our frontend. We encountered 2 scenarios each having bugs, which get fixed after hard reloading the browser. 1. old version of the code -> hard relaod need to get the bug fix after deployment ...

Very Confused

In the docs I read there was supposed to be pages, assets, assets, plugins and static. But what I see is the image I posted from latest install and only find these folders on nuxt.new and UI. I know on Vue it gives you the option to select a template like SPA or not. SPA is what I am looking for.
No description

nuxt generate fails with a strange error

Any idea what could be causing this?
No description

Can't redeem nuxt-ui pro badge

Hello, well not really a big deal but I received the mail 2 weeks ago and tried to redeem the discord badge without success so far. Curious how to actually redeem it.
No description