Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

How do I get the current DOM value of useTemplateRef() ?

I have this code and the watchEffect doesn't log everytime I dran an element. Is it possible to get the value of the current DOM after dragging the arrangement of the element? ```js <script setup lang="ts"> import { ref } from "vue";...

useCookie bugged, not keeping state

I am trying to build a system to keep track of user auth, using composables and useCookie. It works fine however the cookie is completely forgetting its token value between functions. Here's the code: https://pastebin.com/UiRnSPRc When the user calls logIn, the token is fetched and set to the cookie. At line 47 you can see I'm logging it and in my tests it is set to the correct value. However the logIn function then calls fetchUser, which accesses the same cookie - but on line 74 you can see it logs undefined for some reason. ...

Ideas to debug this Nuxt UI / Tailwindcss bug

Hi When I visit my site (in production) on one computer I get extremely rounded corners on almost anything. I can see in the inspection tool that the: .rounded-2xl {...

Describing type for overriden config

Hi All, In a Nuxt app that I work on we rely on config overriding and it works well with Typescript. Unfortunately I encountered problem with describing type for array configs that'll get get overriden. This is the type for the config: ```...

Storing and accessing large json data set for navigation

Hi, We have a large e-commerce site that has hundreds of dynamic pages. What would be the best and most efficient way to store and access the data containing these pages? The data needs to be checked and used on every page navigation....

Nuxt UI Tabs - strange behaviour

Hey, I am a bit lost here with using nuxt/ui tabs and I'm not sure how to continue the bug hunting. I have configured my tabs using the ui-prop with "strategy=override". So I assume that all the tailwind classes should come from my config object right? Still I have an additional class inline-grid where I have no idea where it comes from. I already searched the code and the github repos but I was not able to find it. vue and nuxt are latest version....
No description

Using v-for with NuxtLink?

I'm trying to create NuxtLinks using an array of links and am having trouble getting the v-for syntax correct. Is this possible to do?

Nuxt router goes to undefined

Hey guys, sometimes when i want to route i get this warning: WARN [Vue Router warn]: No match found for location with path "/undefined/serials" This is how i route: ```ts...

NuxtUI w/ Tailwind Module no Intellisense in pages/ directory?

I think ive installed everything properly and classes do work in every file, but I don't get Intellisense inside a Vue file in my pages directory? Is there a common thing I can check?

Dynamic routes examples

Can I get a sample when using a dynamic route?

Set ref in useAsyncData

in nuxt2 with the @nuxtjs/composition-api plugin i was able to do this: ``` const foo = ref(null) ...

Lowercase Authorization header

When calling our microservice with `$fetch(url, { headers: { Authorization: 'Bearer xyx' } }), the header interpreted by the microservice ends up as lowercase. Is there anyway to prevent the header from being lowercased?

Help issuing consecutive api requests, where the second is dependent on the first

Hi y'all. I'm having a heck of a time figuring out the best way to issue 2 consecutive API calls on a nuxt3 page where the second call is dependent on data from the first. It's important to me that all of the data be rendered via SSR, and also fetched lazily when browsing on the client. I've got 2 custom composables that wrap useLazyFetch(). The first fetches an album by slug, and the second fetches photos using the album.id. For example:...

Issue with NuxtUI Pro (mapContentNavigation function)

Hello, I'm doing exactly what is on the documentation: <script setup lang="ts"> const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation(), { default: () => [] }) </script>...

Headless UI modal popup in safari12

Hellos I'm having an issue rendering the modal popup in safari12. It gets inlined, and its z-index doesnt grab.

How do I get the updated data and display correctly?

In my frontend I have a v-for loop that loops how many cards are there ```js Curriculumvit.vue <Cards v-for="(template, index) in templates"...

[TypeScript] nuxi typecheck throws errors from node_modules/@agorastore/shared-ui despite skipLibChe

Hi everyone 👋 When running nuxi typecheck, I'm getting a bunch of TypeScript errors specifically from a Nuxt module in my node_modules (@agorastore/shared-ui). For example:...

nuxt color mode on SSG

Hi there, I'm new to nuxt. To add dark mode to my Cloudflare-hosted website, I'm using nuxt color mode module and Tailwind CSS. I discovered that when I visit my website with the theme in light mode, the button in the images—which is the sun logo for light mode and the moon icon for dark mode—is set to moon even for a second or so then changes to sun icon when the page loads in light mode. When the page loads in dark mode, it works perfectly. Is there anyone who can teach me how to solve this problem?...

Nuxt 3 Routing Mismatching

Hello, I have been battling with a routing mismatch issue in Nuxt since yesterday. My folders are well-structured but deeply nested. Unfortunately, Nuxt is picking up the wrong route when I try to access content in the nested path. Attached are some images to help you understand my file and folder structure, the errors I am getting, and the installed packages. The package.json image, along with the image of the file structure, can help in reproducing the issue....