Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

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

How can make my project's module composables be used my the server?

Hey Nuxt people! I have a basic Shopify module that is working correctly for me: ```ts import {...

Nuxt img is not preloading in ssr somehow

Hi guys! Why is my NuxtImg not preloads in ssr?...

500 Server error, but not for everybody

EDIT Got saved on cloudflare, was obviously my fault. Thanks for reading anyway 🙂 Hello all,...
No description

Include built CSS in module bundle

I'm building a UI Module based on Shadcn-vue and Tailwind. When using the playground app everything is fine since tailwind is installed in the module and can build the CSS correctly. But when using the module in a consuming app, I have no CSS for my module's components. Is there a way to provide CSS alongside my module code ? I tried to make tailwind build the CSS and add it to dist in the module build pipeline, but the module build process erases the css file, and fails if its missing (since its declared as an export in my package.json). Better yet, is there a way for my module to only provide components with tailwind classes, and let the tailwind installation of the consuming app build the css based on what's used ?...

Route aliases and named views

I have this page: ```js definePageMeta({ name: 'PurchaseError', path: '/purchase-error/:token?',...

Nuxt upgrade from 3.17.5 to 3.17.6 causing 500 "Unable to find global scope" with plugins

Dear Nuxt-Team, having issues with the latest upgrade and am a bit lost on what could be causing this - i could not find anything in the release notes that would indicate something should break here Defining a plugin that imports a SwaggerClient (package swagger-client https://www.npmjs.com/package/swagger-client) instance (i don't even have to use it) caused the error "Unable to find global scope. Are you sure this is running in the browser?" so obviously a SSR problem - however until the patch upgrade there were no such issues and nothing has changed with the package...
No description