Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Usefetch doesnt work when using middleware

Hi, I have a problem. If I use middleware (even if it is empty), my usefetch does not work during ssr. It does get the data, but it doesn't pass it to the client.

Trouble with multiple pinia actions inside useAsyncData

I want to fetch a bunch of paginated data on pageload, so I use useAsyncData to avoid dupe requests. I get that you're not really meant to use useAsyncData for side-effects but since it's the only mechanism I know of that prevents duplicate fetches, it's what I got. The problem is, when I generate an array of requests to pass into a Promise, the function stalls. It's not that the reqs array is undefined - it's that nothing runs past it inside that function. asyncData simply returns null before ever reaching the Promise. ```...

Sanity Navigation Error: TypeError: can't access property

Hi! I'm using Sanity in my project but I'm facing an issue with navigation. When selecting a project I initially get an error: Uncaught (in promise) TypeError: can't access property 0, $setup.project is null. However clicking the project again successfully navigates to it On the project page I am completely stuck and can't navigate the same error appears in console and I need to do a hard refresh to proceed. I'm using a simple groq query. ...
No description

I don't want timeout to pause on hover for nuxt ui toast

currently i do the below ```ts toast.add({ title: 'Signing out!', color: 'orange',...

Fresh project with nuxt ui pro and pnpm

I am getting ERROR Named export 'compile' not found. The requested module 'tailwindcss' is a CommonJS module, which may not support all module.exports as named exports. on a monorepo with nuxt 3 & nuxt ui 3. Not sure what the cause is of this. Can anyone provide some guidance? ```{...

Global $fetch hooks

Is it possible to globally define hooks for onRequest and onResponseError (apart from having to create a custom useFetch and use that everywhere)?

Working with types and modules

How do I work with types. The docs said that everything is auto imported and types even auto generated, whatever that means, I didn't understand from the docs. Just imported first module and nothing works, beside no errors and nothing appearing the module is not recognize and i can't find in the whole docs a solution how will this can be configured. Says it's working by default
No description

Testing `import.meta.client` and/or `import.meta.server`

Basically, this: https://github.com/nuxt/test-utils/discussions/884 For me, its a soft-blocker to move from process.client to import.meta.client...

How-to set a response header in the server route

I'd like to know how to explicitly set a header in response to a server route. Specifically, I'd like to set the Content-Type of the returned data. This question specifically relates to /server routes. I understand it's possible to set the HTTP response status code using setResponseStatus(event, 202). However, I can't find any details on setting the response headers....

Launch command build and falls during Nuxt Nitro server

`<--- Last few GCs ---> [23471:0x7fef53300000] 178952 ms: Scavenge 2017.5 (2066.1) -> 2017.2 (2077.1) MB, 7.45 / 0.00 ms (average mu = 0.458, current mu = 0.278) allocation failure; [23471:0x7fef53300000] 178968 ms: Scavenge 2024.7 (2077.4) -> 2024.9 (2077.9) MB, 7.16 / 0.00 ms (average mu = 0.458, current mu = 0.278) allocation failure; [23471:0x7fef53300000] 180278 ms: Scavenge 2025.5 (2077.9) -> 2024.6 (2099.9) MB, 1309.32 / 0.00 ms (average mu = 0.458, current mu = 0.278) allocation failure; ...

How do i prevent useCookie from doing stuff on SSR?

Hi! Is it possible to make useCookie only run on the client?

HELP NEEDED - Google Storage Bucket Integration

Is there a way to integrate Google's storage buckets as a file storage in nuxt 3?

Custom route roules

Is possible to do something like this to intercept all the xml routes? With this code seems not work 😦 `routeRules: { "**.xml": { proxy: {...

Nuxt UI Pro : Custom component Maximum recursive updates exceeded

Hello I created a CommonsSelectMenu component that uses USelectMenu to avoid repeating code, but when I use it I get the error "Maximum recursive updates exceeded.", the error message is displayed locally but in production it freezes my app when I click on it. This is the content of my component :...
No description

How to invalidate on-demand builder cache on netlify with nuxt/graphql

Hi everyone I have the following situation: I have a CMS from which I use graphql to fetch data on a page basis to display it in a nuxt3 frontend. Since netlify is now able to generate the page on the server with on-demand builders, we don't want to statically generate the site anymore....

Broken CSS Nuxt 2 + Vuetify

Hi everyone, on a work project i am struggling with a bug on which i can not wrap my head around. Simingly randomly (1/10 times) after the login into my application all the css of the application is not applied anymore. The only way to resolve the issue is to reload the page and the css is correctly shown. You can see the problem on the video i attached to the thread Looking on the console / network / or the nuxt console i see no error. I already tried googling and searching online but can't find anything meaningful. I am certain that at the start of the project while developing it never happened, it basically started one or 2 months ago but i can't explain what is causing it. Currently i am using - nuxt 2...

Cannot deploy on Cloudflare - global is not defined

Hey guys, I have this error while deploying my Nuxt3 app on Cloudflare Pages 12:33:11.829 ✨ Compiled Worker successfully 12:33:11.996 Found _routes.json in output directory. Uploading. 12:33:12.007 Validating asset output directory...

I am not able to submit my form for some reason

As the title says, I can't submit my form. No error is shown in the console but nothing happens. here is my form: ```vue <UForm :schema="objectiveFormSchema" :state="formData" @submit="onSubmit" class="w-full flex flex-col gap-4">...

How can I change my formgroup so it looks similar as seen on the picture?

This is the FormGroup code:
<UFormGroup required class="p-4 border-b" label="Title" description="Enter Article Title">
<UInput placeholder="Enter Article Title" size="md" v-model="formData.title" class="w-full"/>
</UFormGroup>
<UFormGroup required class="p-4 border-b" label="Title" description="Enter Article Title">
<UInput placeholder="Enter Article Title" size="md" v-model="formData.title" class="w-full"/>
</UFormGroup>
...
No description

Unable to restrict /es/admin path

I am using i18n Nuxt extension. This is my code: ```ts // https://nuxt.com/docs/api/configuration/nuxt-config...