Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

useFetch's tranform equivalent for $fetch

What useFetch's tranform equivalent for $fetch?

Nuxt keep infinitely sending request when using useFetch

Hello, I am wondering is it a bug or my code just wrong? Nuxt 3.17, node js v24.1.0 Server gets request as expected. Here is composable...

Warning after upgrading to Nuxt 3.17.x: useAsyncData must return a value

Hey everyone! ๐Ÿ‘‹ Iโ€™m using Nuxt 3.17.5 together with @nuxt/content 3.6.3. After upgrading Nuxt to 3.17.6 (or 3.17.7), I started seeing this warning in the console: ``` [nuxt] [warn] [useAsyncData] must return a value (it should not be undefined or null) or the request may be duplicated on the client side....

Single root for components in vue3 ?

Hello Kapa I'm never sure if in nuxt 3 / vue 3 it's still important to have a single root in a component is this ok ? ...

custom colors NuxtUI & useColorMode

Can I use custom primary colors for themes? The idea is that, for example, in light mode the primary color should be blue and in dark mode the primary color should be yellow....

dynamic nuxt layers

May I know if it can be dynamic like it will render the second layer's app.vue/index.vue based on a state value?

API doesnt work

server/api/auth/register.post.ts ``` import { User } from "~/models/user.model"; import rateLimit from "../../../server/middleware/rateLimit"; ...

Warnings that I don't understand

I can't understand these warning. Can anyone help me figure out where the problem is? Hydration completed but contains mismatches. Hydration children mismatch on <X>โ€‹ Server rendered element contains fewer child nodes than clientvdom. No match found for location with path "/.well-known/appspecific/com.chrome.devtools.json"...
No description

wildcard subdomain issue on Plesk panel

I have deployed my nuxt app on my Hostiner vps using plesk panel, I can access the app on "example.com" but when I try to access the subdomain that points to the app root directory as the main domain I get 403 page error, I have created a DNS A record *.example.com points to my server ip, and I also have created a wildcard subdomain on plesk panel but when I try to access any subdomain I get the 403 page error, any help, I have searched and asked ChatGPT but I couldn't find any solution, thanks

NuxtImg not working?

Hey Nuxt Community! I am a Nextjs transitioning over to Nuxt. I stumbled upon NuxtImg and wanted to make use of it. It seems like I cant make it work. It displays an error icon where the image is supposed to be. I installed the module....

Nuxt 3 architecture rework โ€” performance & SSR

Weโ€™re currently restructuring our Nuxt 3 app due to performance issues. Our pages are rendered via a two-step waterfall: First API call: get route metadata (e.g. pageType, id) Second API call: fetch actual content based on the above...

Best practices for mocking third-party clients e.g. AWS SDK in nitro

i am writing integration tests for my nitro framework API (nitro.build). I'm currently using nitro-test-utils to spin up a global nitro server instance to run my $fetchRaw requests against. The problem is I need to mock some calls to AWS services inside some internal functions of my endpoints. I can't seem to get vi.mock or vi.spyOn to work as they don't seem to target the function or AWS clients bundled in my running server instance. I only need to mock the functions in some tests, and i need t...

Dynamic src of UAvatar not loading properly on page reload

I have a component <div> <UAvatar :src="selectedPlayer.photo" icon="i-lucide-user" size="3xl" class="ring-2 ring-neutral" /> <USelectMenu v-model="selectedPlayer"...

Plugins don't load

I've put my app into src directory for organization, and put plugins in and they didn't load. I did do ```ts // source directory srcDir: "src/",...

Add content to UModal with useOverlay()

So I am using UModal with useOverlay() from Nuxt UI. I'd like to be able to pass in some content to the modal, but how does this work? modal.patch({...

Reducing Vercel Edge Requests on Static App

Hello! I'm currently hoping to reduce my edge requests by 1 million requests per month. I was hitting 4-5million requests until I moved to a CDN, which has reduced it to about 2 million. I'm currently on the PRO plan and am hoping to move down to Hobby plan due to financial constraints. After an inspection of my requests, I've discovered a huge chunk of my remaining requests come from files generated via code splitting. This is an area I'm not familiar with. ...

Nuxt UI - Chip with custom color

I am creating a SelectMenu component. There is a choice to set a chip for each item. Can I set a custom color for each item? (Not just pre-defined colors from config but color from hex or integer format for each item)

Socket io client crash my website on safari

My website crash when it receive data from a socket io server, there is no error in console the website lost reactivity i don't have the issue on chrome...

ChartJS not showing

Hi! I recently tried to add a chart with the help of chart.js, I reused the code from the vue-chart-3 documentation (https://vue-chart-3.netlify.app/guide/examples/vue3.html which brought me to https://codesandbox.io/p/sandbox/demo-vue-chart-3-ugynm?from-embed) but unfortunately nothing is displayed on my page, I tried many other things, including adding a plugins/chartjs.client.ts file, but nothing changes, it still does not display.
No description