Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Is it possible to consider host header during ISR caching?

hey, when using routeRules isr, is it possible to consider the host header as well? i am working on a multi-tenanted app and trying to cache the response per tenant.

GitHub Action - Deploy to NuxtHub

Everytime I push to my GitHub repo I get the following error from my action that's been automaticly created by NuxtHub. Why is that? (Full Actions Logs attatched)

Is it possible to remove a plugin inherited from a layer via module?

I have a plugin being installed that I don't want. Can I remove it somehow? Maybe using a module?

mocking useI18n with nuxt i18n module

What previously worked within my tests to handle mocking useI18n calls no longer does. I get the error Must be called at the top of a setup function How frustrating!...

Dynamic routes with [...slug].vue not keeping components alive

We have a dynamic project loading everything from an API. What happens if we change the URL 1) In the middleware we use defineNuxtRouteMiddleware to catch the new route 2) Then all components react on the route change and update themselves with the new data, everything would be perfect but then ... 3) When everything is finished, due to the route change the root component and all other components are new mounted and are re-rendered. It's working but I hope we can make it more efficient. ...

The argument 'filename' must be a file URL object, file URL string, or absolute path string.

``` C:\Users\zackp\Desktop\inevitabilityblueprintapp>yarn generate yarn run v1.22.22 $ nuxt generate [ nuxi 1:11:40 PM] Nuxt 3.16.0 with Nitro 2.11.6...

nuxt middleware auth refresh

Hi. How do you guys prevent the quick flash when you refresh the page where a supabase middleware check is on? Right now i first shortly get redirected to te login page and then back to the dashboard. I think this i because the check is with supabase client so not on the server. Is this a normal thing? the code i use == export default defineNuxtRouteMiddleware((to, _from) => { const user = useSupabaseUser() if (!user.value) { return navigateTo('/login')...

yarn create nuxt -h gives old flags?

On Windows 11, I put in the command yarn create nuxt -h and it gave me the following: ```cmd yarn create nuxt -h yarn create v1.22.22 [1/4] Resolving packages......

Configure unhead v2 in Nuxt 15.6

Hi! In unhead v2, the template param is opt-in. Documentation says to: ```...

NuxtImg not loading the images - error with IPX

Heya, I am having issues with the NuxtImg module. I can't seem to get the images to work. Have anyone experienced this before? Tried putting the images inside public folder but also assets. I check console and I get errors like shown in the images: ``` Failed to load resource: the server responded with a status of 500 (Internal Server Error)...
No description

Setting the base pages path in layers config

In my main nuxt.config.ts file, I'm extending two layers like this: ``` extends: [ './app/layers/candidates', ...

Add gtm with nuxt

Hi guys I am currently using https://scripts.nuxt.com/scripts/tracking/google-tag-manager nuxt scripts to add my Google tag into my project, although when testing using Google tag assistant it can detect the tag on the main page but the Google tag assistant would not be able to detect the tag when navigate to other pages in the site. But it would be able to detect the tag when I refresh the page...

Error message when using LRU store driver

Hi, following on my previous post about 1h ago, I decided to give the LRU storage driver a try. It worked just fine on one website, but gave me this error on another one: TypeError: Class constructor LRUCache cannot be invoked without 'new' Both sites are almost identical. Some dependencies might not be the exact same version though. ...
No description

Nuxt 3 on Vercel - Store cache in memory vs Vercel KV ?

Hi everyone, I developed this habit of always tying every new Nuxt project to a Vercel KV store. But every now an then, I'm facing this issue where the store reaches 5-7k keys (300b to 12kb each) , even though I only have 50 pages on some of the websites, and I can't seem to delete a single key or even flush the entire store using useStorage().removeItem() or useStorage().clear() from my Nitro event handler. I don't exactly remember the error message but it was a Redis error related to the store being to big or having too many keys. I use this setup to store my API responses so I don't have to fetch the same content over and over. I set up a process in order to clear some cache entries on content updates on the CMS and also on Vercel deployments. But sometimes it's hard to know every single part of the website you need to clear the cache for, so I get some pages that don't reflect the latest changes....

Help getting started

hey i joined one of my college's clubs recently and their site is made with nuxt. I have never worked with a framework/meta framework before but i do know javascript. What concepts do I need to learn to understand how the codebase works?

Is there an way to login to a user on the server side without sending the token to the client?

Hi, is there an way to login to a user on the server side without sending the token to the client on the Supabase Nuxt module? Because I have a form for unlogged in user and if they submit the form and the sever insert the data the user gets a jwt token. I added useSsrCookies: false to the Nuxt.config.ts and it didn't worked. ...

z-index glitch

Hello, I'm using Nuxt UI3 and have created a dropdown to select a time period for loading data. However, the dropdown menu appears beneath the header of my table. How can I fix this?
No description

Can tailwind prefix be set on a per-layer basis?

I built a nuxt app in isolation with tailwind/shadcn components. I didn't use a tailwind prefix. Now, I have a challenge to inherit our base layer which uses tailwind prefix. What are my options to not have to add prefixes to all my app's components?

Configure default nuxt/icon icon-set to leave out prefix

Would it be possible to configure a default icon-set to be able to leave out the prefix:
<Icon name="search" />
Instead of:...

useFetch, how to type correctly.

I have this useFetch: ``js const updateRef = ref(0) const { data, status } = useFetch(/api/v2/locations/${parsedId}`, { watch: [updateRef],...