Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

NuxtUI: Impossible to install

Hi, I was previously using Tailwind and I just found out about NuxtUI. I removed my @nuxtjs/tailwindcss and followed the official documentation for NuxtUI => https://ui.nuxt.com/getting-started/installation/nuxt ...

Html attrs lang fr doesnt work

I change html attrs in nuxt.config.ts in fr but it doesnt work. app: { head: { title: "Nuxt", htmlAttrs: { lang: 'fr',...

"ref is not defined" in custom module only when installed as an external dependency

I get this error only when installing my module from another project of mine. In the playground everything works fine. What could be the problem here?...

nuxthub How to use separated env for local/stage/live

As now I have runtime config ```js runtimeConfig: { // @ts-ignore backendKey: env.NUXT_LYS_WEARHOUSE_KEY || '',...

Fetching data in Pinia store - useFetch make sense here?

I have Nuxt app with Pinia. In one store, I find myself using useFetch for data fetching (with SSR support), then expose the status, error and another computed variable which does some computation on the data returned. ``` stores/store-a.ts export const useStoreA = defineStore("storeA", () => { const {...

Nuxt, Supabase with Tanstack

i'm using nuxt with supabase for authentication and everything, is it best practise to use it with tanstack for data fetching for loading states and everything or should i use it with build in nuxt functions ?

How to send back an image from nuxt3 api endpoint?

I want to secure my images that I send back, so I send it back through an endpoint, but when I do that, chrome can't read it. It sees like 2.4mb being transferred, but the resource size ends up being 0kb. I try this, and it works if I visit it directly in browser link, but not when I call it from JS. What am I doing wrong? I am calling it using $fetch, but I can still see it in network tab, the response is not showing correctly. ```...

Nuxt Server: Rewrite

Is there something like https://nextjs.org/docs/app/api-reference/functions/next-response#rewrite for nuxt, so we can build Multi-tenant Custom subdomains with nuxt & vercel (Next example: https://www.youtube.com/watch?v=vVYlCnNjEWA) Thanks in advance!...

ERROR [unhandledRejection] near "[{"name":"Clinical Pathology","questions":[]": syntax error

```json { "university": "University of Leeds", "year": "2", "modules": [...

How to set production port?

npm run build always builds on default port 3000 despite setting the PORT .env variable, and even getting help from chatgpt that said to set it in runtime config ``` runtimeConfig: {

public: { port: process.env.PORT || 3300...

const { data: home } = await useAsyncData('leeds', () => queryCollection('uniofleeds').first())

Argument of type '"uniofleeds"' is not assignable to parameter of type '"content"'. import { defineContentConfig, defineCollection } from '@nuxt/content' import { z } from 'zod' ...

Use Nuxt with Express.js instead of nitro

Hello everyone, I really need some help I dont know how many hours I have spent on this simple task and yet I can not fix it. I want to use nuxt with express.js for the back instead of nitro but I want of course to keep nuxt's auto routing for the front end. I have made a project , added this to nuxt.config.ts ...

moving from supabase realtime to my own pg notifications + websockets?

Hi, currently I'm relying on supabase realtime which is very very iffy constant random disconnections and errors even with a file that should handle that. So I want to try to build out my own websocket handling. I have some experience with socket.io. Most of my websocket usage currently is subscribing to tables for changes client side to handle data being changed. What would moving to make my own websocket handling look like?

How to access server context / global state from a websocket handler?

I have this simple websocket handler defined at server/routes/websocket.ts, I've already enabled the nitro.experimental.websocket flag in nuxt.config.ts and it works fine. ```typescript export default defineWebSocketHandler({ open(peer) {...

Any way to speed up dev server build time on NixOS?

Trying to debug an issue with either Nuxt or how Nixpkgs provides the Node binary, and because of that, dev servers take up to five minutes to load. Is there any way to debug these issues beyond playing around with Node's inspector? This issue also seems to be plaguing bun. https://github.com/nuxt/nuxt/issues/28023...

What is the proper way to use the shadcn-vue sidebar?

I was a little surprised to see sidebar isn't integrated into layouts. Do I lose anything by not using layouts? Should I follow the shadcn-vue docs to a "T"? https://www.shadcn-vue.com/docs/components/sidebar.html...

nuxt ui carousel + nuxtimg preload images

Hi, I'm using nuxt ui carousel (embla carousel) to display nuxtimg images. however I filter my list of items i put into the carousel based on the variant selected of my product. so when i change product the items list will contain some new items and it seems that those new images are then downloaded. is it possible for me to somehow preload all images for my variants even if not in the items array yet?

Monaco Editor fail to load

Hi everyone, I tried to find an answer, but I can't make it work after hours of trying 😦 Subject: Install and use the Monaco Editor (I used this module https://nuxt.com/modules/nuxt-monaco-editor)...

Supabase asking for env keys when adding server/api folders

Hi, I was correctly working with supabase until I created those endpoints, now I get this error Your project's URL and Key are required to create a Supabase client! Check your Supabase project's API settings to find these values https://supabase.com/dashboard/project/_/settings/api I have the .env files like this ...

NuxtJS not update after deploy on production server

I have experience after build nuxt with command npm run build on production server sometimes need to open network devtool network and disabled cache then reload so my webiste is change, is there better way to detect the new version of build to when it change will automatic pull the new build form server