Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Nuxt Server: Extend H3Event with Typesafety

I am trying to create a util like https://nuxt.com/docs/4.x/guide/directory-structure/server#server-utilities so I can reuse validation code like: ``` const user = await serverSupabaseUser(event) if (!user) { return sendError(event, createError({...

DropdownMenu on Hover Mode

Hello, I'm currently migration a project from NuxtUI v2 to v3/v4 and in the past it was possible to have the Dropdown expand on hover instead of click, because it's just more convenient. This is my component currently. ```html...

Save data in mysql Lite nuxt content db

Is there a way to use the SQLite db connection to save custom data in this db in nuxt content?

chunk large than 500kb

when i generate static, the command shows a warning as below, and how to fix it?: WARN [plugin builtin:reporter] 11:04:05 PM
(!) Some chunks are larger than 500 kB after minification. Consider: - Using dynamic import() to code-split the application...

shows blank page after integrating rolldown

why my nuxt 4 shows blank page in dev serve pnpm dev but working fine in production serve pnpm generate?

Where to do database calls?

Hello, I need to fetch data from my database using Prisma. The data should then be displayed on my page. Of course, reading the database should only happen server-side....

UTable not displaying data when using v-model:global-filter in Nuxt UI 4.1.0

Hi everyone, after updating to Nuxt UI 4.1.0 (released a few hours ago), I noticed an issue with the UTable component.
When I use v-model:global-filter="globalFilter", the data in the table does not render at all. If I remove the v-model:global-filter prop, the table displays the data correctly. ...

How to use a custom pages directory `(outside app/pages)` in Nuxt 4?

Hey everyone 👋 I'm currently exploring Nuxt 4 and trying to organize my project structure using a modular, feature-based layout. Here’s my current folder structure: ``` app/...

Using Nuxt 3, is there a way to access plugins on the window object?

Looking to access our PosthogClient plugin from the window context as we're loading in a cookie consent platform called CookieHub from DOM scripts. CookieHub takes a config with a bunch of function handlers and we need to be able to access the PosthogClient plugin from the window object in order to be able to enable/disable tracking....

undefined default value of data

is the undefined default value of data in useAsyncData() a Nuxt 4 feature? Or is it backwards compat with Nuxt 3?

Module Plugin not being typed

I'm making two modules, one which has the other one as an optional dependency specified via moduleDependencies, but for some reason it seems the plugin types are not being processed by nuxt at all, the plugin names don't appear in the 'dependsOn' property, the provides aren't showing up in the NuxtApp interface... I don't know what I am doing wrong, any ideas of what may be the issue?

How to propogate abort signal through api route?

I have an api route that calls another api like (openai completions, another nuxt api route or an agent). How can I make sure that when I abort the outer api, the inner api calls are aborted as well? I'm trying to do it with event.node.req.on("close") since "aborted" is deprecated according to https://nodejs.org/api/http.html Can't find any documentation on this and I would guess its a pretty standard usecase...

nuxt/fonts - font-display:auto/swap for Adobe

I am looking for some guidance on the nuxt/fonts module. I have these versions: ``` "@nuxt/fonts": "^0.11.0", "nuxt": "^4.1.2",...

Overriding Variable in Dev mode

I am trying to find out, wether there is a way on how I can override a environment variable in Nuxt. I already looked through the docs (https://nuxt.com/docs/4.x/guide/going-further/runtime-config#environment-variables) and the GitHub issues of Nuxt and Nitro, but can't find anyone with the same issue. We are using layers and define the layer when building multiple sites:...

Setup Nuxt Content with Nuxt pages and layouts

Hey all, I wanna setup a Nuxtv4 project with content, ui and icons but I'm struggling how I can create a cool docs website where I can edit the content on the page whit user permissions. Is there a simple setup demo to use layouts and add .md content files?...

weird error

Uncaught (in promise) SyntaxError: The requested module '/_nuxt/@fs/home/debian/dev/bot/apps/web/node_modules/.cache/vite/client/deps/@vueuse_core.js?v=0ae39879' does not provide an export named 'toValue' (at useFormControl.js?v=0ae39879:2:10)

v-for doesnt infer type from computed

Hey, not sure if I'm doing anything wrong here. But I have this piece of code: ``` const selectedProducts = computed<StorefrontProduct[]>(() => { return products.value.filter(p => {...

Nuxt3 PWA setup correct configuration

How can i setup my app to add PWA with "@vite-pwa/nuxt"

Cannot find name 'isBrowser' in nuxt.config.ts

im working on supabase auth in nuxt 4.1.3. here is my config, i have followed the docs using isBrowser() but it said "Cannot find name 'isBrowser'" ``` ... clientOptions: { auth: {...

ssg warning

it shows a warning whe n i use pnpm generate WARN "file:///C:/Users/zhaol/Projects/bluevyadmin-nuxt/nodemodules/.pnpm/nuxt@4.1.3@parcel+watcher@_674dfa8c81bca27ffe7433854a124509/node_modules/nuxt/dist/core/runtime/nitro/utils/cache-driver.js" is imported by "virtual:#nitro-internal-virtual/storage", but could not be resolved – treating it as an external dependency....