Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

If I have several routes cached with swr, how do I bypass that cache if the user is authenticated?

I want to be able to page cache certain routes, like: ```js routeRules: { '/blog/**': { swr: 600 }, }...

To allow this host, add "xxx.ngrok-free.app" to `server.allowedHosts` in vite.config.js.

To allow this host, add "xxx.ngrok-free.app" to server.allowedHosts in vite.config.js.

Nuxt UI v3: Custom theme colours

In the latest Nuxt UI v3, how can I add custom colours to be used as primary and secondary that are not TailwindCSS colours? What I mean is that I want to define a palette different from TailwindCSS palette....

UDropdownMenu not opening.

Hi everyone, After updating my NuxtUI package to "@nuxt/ui": "^3.0.0-beta.2", my dropdown menu has stopped functioning. I’ve tested this with my custom language switcher implementation as well as the example from the documentation, but neither instance activates the dropdown. There are no errors in the console or terminal, so I’m not sure what’s going wrong. Modules that I'm using:...

stuck whit the nuxt-auth-utils useUserSession

every time i change import or anything i get new errors i cant seem to find where to look or what to change to get it to work ```import { defineNuxtRouteMiddleware, navigateTo } from 'nuxt/app' import { useUserSession } from 'nuxt-auth-utils'; // Correcte import ...

Given that im building a nuxt app with aws-lambda preset, how can i apply callbackWaitsForEmptyEvent

Given that im building a nuxt app with aws-lambda preset, like: ``` nitro: { preset: "aws-lambda", inlineDynamicImports: true,...

Nitro cache not expiring on error

If a cached nitro handler throws an error, will the error prevent the cached result from being purged from cache even if the age of the cached result is way beyond its config? Is that intended behavior? I have a route that shows an outdated cached result and I think it's because now the api route throws a 404 in the handler because the underlying data is no longer available. But the nuxt API route does not reflect this, instead still showing the old and outdated cached result. This seems unintui...

Hydration hell - A simple loading state on a Nuxt UI button

Hi, I have a UButton from Nuxt UI for which I set the loading prop to true initially, then onMounted I switch it to false. This gives me a hydration error and I can't understand why. My actual use case is more complicated that the example I'm sharing, as it involves a state from Pinia and when loaded I put the buttons loading off. But even if I strip away all the state things and have just a button with a loading state which turns of when mounted, I'm facing problems. Button: ```...

Dev server reloads take about a minute and do close to 1k requests

I haven't been on a project for some days and now suddenly dev server takes about a minute to load on each refresh It comes down to nr of requests, it does about 1k requests. With cache enabled it comes down to "just" about 45 sec, with cache disabled it's around 50-70 sec Is there a way to make it more snappy? Don't even know where to start investigating. Some config value somewhere most likely...
No description

NuxtImg not working in production with IPX on Linux (Ubuntu Server 24.04.2, NodeJS 22.14.0)

NuxtImg looks to be broken in prod mode on linux, but interestingly enough, was working fine under windows before i tried actually deploying. All images, except for one which also isnt working, are stored under public/images. Im getting these errors in the browser console. Any clue as of what might be going on ? The image/background for my hero section which was applied with background-image css is working fine.
No description

SelectMenu, trailing button issue.

I’m trying to add a clear functionality to the SelectMenu component using a button in the trailing slot: ```html <USelectMenu v-model:model-value="selectedCountry"...
No description

How to reroute a request to a different template: GET /hello -> render(/foo/hello.vue)

Hi, when a request comes into the server, I want to check the hostname and decide which page to render. How can I do that? I've looked at nuxt-multi-tenant module and it's possible, but that module uses dynamic routes. I have static routes.
Seems like this should be an easy win, but when I try to modify event.page in defineEventHandler() it's read-only. 😦...

Toggle useAsyncData's server option on SSG with SSR dynamically.

Hey! I am building a SSG with SSR. I use useAsyncData to fetch data from an api. After deploying my app to a webserver, i would like to use ?ssr=false query-string to (re)load the content from the api on the client site. Is this somehow possible to do that on demand?

How can nuxt use a stage name in its url? Im using AWS apigateway,

How can nuxt use a stage name in its url? Im using AWS apigateway, so a stage name, like /prod is appended at the end of the base URL. The nuxt app is not working and giving errors like: ...amazonaws.com/_nuxt/GlKMZ6mC.js is not found. Thats because it should be ...amazonaws.com/_nuxt/prod/GlKMZ6mC.js...

Nuxt has an error reloading the page when clicking on a link

My Nuxt project in development when clicking on links wrapped in <NuxtLink> tags all reload the page, my ui components are not displayed, devtool is also hidden. In production it works fine. Has anyone encountered this problem, please support me.

Connection error

Does anybody know what causes this error? I am new to nuxt and this already happened multiple times. Im running nuxt on my local machine.
No description

Nuxt UI Pro dashboard sidebar not rendering.

I'm creating a dashboard in nuxt ui but the side bar is not rendered at all. I have followed all the installation steps.

Nuxt UI table, tooltip on row.

How would one create a tooltip on a complete row. Couldn't figure it out with the templating...

Custom useAsyncData - $fetch TypeScript error🙏

Hello everybody, I have followed the nuxt 3 guide to create a custom fetch client. All seems to be right, but when I'm going to add TypeScript FetchError<CustomError> in useFetch, I receive this TypeScript error (I'm a TypeScript newbie): ```...

Error parsing JavaScript expression: Unexpected token, expected

[plugin:unplugin-vue-i18n:directive] Error parsing JavaScript expression: Unexpected token, expected "," (3:16) /Users/x/Development/frontend/components/settings/AccountingSettings.vue at createCompilerError (/Users/x/Development/frontend/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:1364:17) at emitError (/Users/x/Development/frontend/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:2949:5) at createExp (/Users/x/Development/frontend/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:2942:7)...