Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

useFetch type inference

Hello! Been using nuxt for a few days now and most things are amazing so far, love the overall DX. I do have one small gripe with useFetch though. Take the following code ...

show me how to make dark mode for nuxt3 with ssr = true

show me how to make dark mode for nuxt3 with ssr = true but every time I f5 it doesn't get out of sync causing the background to have the wrong color for 1s before returning to the previously set color

Data fetching on SSR using useFetch/useAsyncData does not work on page refresh/reload

I've searched extensively but haven't found the correct solution. Here are some points I've considered: * The site certificate is NOT self-signed, so adding NODE_TLS_REJECT_UNAUTHORIZED=0 is unnecessary. * Setting server=false or any implementation that moves the request to the client-side is not preferred, as my goal is to use SSR for data fetching. My SSR application is hosted in AWS, following a structure similar to the one described here (see attached image) but with CloudFront in front of ALB....
No description

Color of Logo does not get updated from SSR prerendering although reference values changes

Hello everyone I am currently fixing a problem regarding my logo and it is a pain in the a.. The first attachment is our logo. In light mode, everything is okay, but when switching/running dark mode, it should display 'omott' in white. Due to SSR it loads initially in black and does not update itself when receiving the actuall colorMode. Does anyone know how I can force an update or fix this mess? I simplified code from my problem can be seen below. ...
No description

Change icon color of UPageCard

Is it possible to change the color of the icon of a UPageCard component? If yes, how?

Multiple input field

Would something like this be possible with NuxtUI pro? I can't seem to find anything other than https://ui.nuxt.com/components/input-menu using "multiple", but this requires a pre-defined list of input options. I need the user to input whatever they'd like
No description

Nuxt Devtools

Hi guys, I’ve found an issue and I’m not sure how to debug it. If I open the website in the Telegram webview, it renders properly. However, when I click a link with target="_blank", it opens a new tab displaying the source code of the page. When I refresh the page, it then renders normally. ...
No description

Build size slow down website!

Hi! I have a Nuxt app with a basic pre-rendered landing page, but when I check PageSpeedInsight, it show the page is super slow due to the Nuxt script It's a super simple landing page, so no idea why it's so heavy. Is there a way to fix that?...
No description

Advice on Nuxt project setup

Hi all I have written a simple backend in rust that does session auth with cookies. Now the last couple of days I have been trying to make a simple frontend for this in Nuxt but I'm very new to using this kind of frontend frameworks so ive been struggling a bit with whats what. For now Im stuck on the following things:...

Typescript and useFetch transform

I have fairly persistent issues with useFetch() and transform in typescript ; transform seems to expect the shape of the response not to change, which (at least for me) defeats the purpose ```ts export default async function() { return useAPI('/messages', { transform: (data: { messages: Message[] }) => data.messages,...

Nuxt3 Generate - static assets relative path

Hello guys, when using npm run generate, how to set a relative path to _nuxt folder assets? i want to serve it via electron, inside the src folder...
No description

Seeing helper.removeColorScheme is not a function from color-mode module

I am getting a new error from within my test runs. It causes quite a bit of noise in my test output. Anyone know why /how to fix this? ``` TypeError: helper.removeColorScheme is not a function ❯ ../../node_modules/@nuxtjs/color-mode/dist/runtime/plugin.client.js:86:12 84| window.document.head.appendChild(style);...

Nuxt errors after refreshing package-lock.json (A composable that requires access...)

I'm getting the following errors after refreshing my package-lock.json/updating some packages: Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables. ⁃ at useNuxtApp (C:/Users/.../Documents/GitHub/es-nuxt/nodemodules/.pnpm/[email protected]@[email protected]_@[email protected][email protected][email protected][email protected]__tgdyf4tahfh2p7d7ptjabx7uva/node_modules/nuxt/dist/app/nuxt.js:248:13)...

Clearing UForm errors

I'd like to clear errors from (untouched) fields that had been previously manually set by form.setErrors() in Nuxt UI 2. I tried : ```ts :validate="() => {...

middleware on nested routes

I have an admin/ route with its index.vue page and algo nested routes: admin/users admin/users/[id] I added a middleware in the root admin page but the nested routes don't inherit the middleware...

Set layout in routes

Hello Kapa told me about a legendary appLayout in the nuxt.config.ts but it doesn't seem to exist ```ts routeRules: {...

Failed to fetch urls with sitemap.xml

I am getting the following error when trying to get all valid urls for my webapp. [@nuxtjs/sitemap] Failed to fetch source. { url: 'https://api.kingsburyandpartners.ae/sitemap/urls.json', error: { FetchError: [GET] "https://api.kingsburyandpartners.ae/sitemap/urls.json": <no response> fetch failed...

useRequestFetch does not pass cookie when path is not "/" on ssr

I have a refresh token API in the backend. The refresh token is saved to cookie storage during login with path specific to the refresh token API (e.g. path=/api/refresh-token). However, whenever I try to call this API during SSR in frontend and debug with the backend refresh token API, refresh token value from cookie is always empty. This is how I make a request with useRequestFetch. ```ts...

tests are queued but never run

I am trying to add unit tests but vitest would never actually run the tests. Here are the list of relevant files:
No description

how to send original request from onResponseError?

1. response fails with a 401 2. within onResponseError, perform refresh and get new bearertoken 3. from here, how do i retry my request with the new headers? ive tried.. ```typescript...