Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

useFetch return values are undefined

I have a call to my backend to retrieve data from a database. ``` const headers = useRequestHeaders(['authorization']) const { data, pending, status } = await useFetch('myEndPoint', { headers,lazy: true, server:false})...

nuxt ui form validation, zod, validate only specific field not whole form

Hi I have a nuxt ui form using zod error validation, one of my fields is a cloudflare turnstile token which is validated to ensure it's not empty. however once the error appears if i complete the turnstile challenge the zod error wouldn't disappear until resubmitting the form. so I added a watcher to check when the turnstile token isn't empty to validate the specific field in order to clear the error. however this seemingly triggers my whole form validation. ```formRef.value.validate('cfTurnstil...

Having the fetch context (SSR) in a composable

Hello, Currently if i'm using the following code in a page, it works. ```...

turnstile module where to set options globally

using turnstile module, ``` turnstile: { siteKey: '<your-site-key>', options: { appearance: 'interaction-only', },...

Issues deploying to Azure SWA with Universal Rendering.

Hello, I'm just looking for some direction as I've hit a wall. I'm moving a Statically Generated Nuxt3 site hosted on Azure SWA to use Universal Rendering hosted on SWA. So far I'm only getting a blank screen after deployment. Can someone point me in the right direction to debug this, as I'm not familiar with Azure and what I've found here and via Google has not been helpful, since I seem to have everything configured correctly, env variables loaded in Azure, etc. Thanks for any help and directi...

What happens if two modules have the same configKey?

Reading the docs (https://nuxt.com/docs/guide/going-further/modules), it's unclear what happens. This line in the defineNuxtModule section makes it seems like they get automatically merged? "Support defaults and meta.configKey for automatically merging module options"...

textarea round only left corners

```<UTextarea ref="textareaRef" v-model="content" autoresize :rows="1"...

Can I use useAsyncData for user interactions?

I'm working with a CMS or a third-party service that provides its own query layer. According to the documentation, I should use useAsyncData for data fetching. However, I also want to fetch data in response to user interactions, such as submitting a form or clicking a button. In these cases, should I still use $fetch, or is it appropriate to use useAsyncData as well?...

How to reference custom logic when adding a template in my own Nuxt module?

Hi, question for the module authors among us, I'd like to expose custom functionality in a template I am adding using addTemplate({...}), right before it I am calling my addPlugin(resolver.resolve(...)). Since this is going to be accessible through #build I do not know how to import it correctly? I've looked at existing code and it seems to be possible to import stuff from # and stuff installed in your package.json. How could I make my own #my-module module and expose it through there? I hope my question makes sense, thanks in advance. Here's the relevant code: ```ts setup(_options, _nuxt) {...

Loading local postcss plugins

Can't find any documentation or a way to load local postcss plugins. Is there any examples?

nuxt-seo - robots.txt error

Hello, When installing and using nuxt-seo, I was expecting it to handle the robots.txt by itself, specially reading this : https://nuxtseo.com/docs/robots/getting-started/installation ...

Data Fetching Composable Advice

We have an Organization entity in our app, and each organization has related Events. We’re expecting to reuse this fetching logic across multiple parts of our app. Fetching the organization data alone is straightforward and nicely encapsulated: ```ts // composables/useOrganization.ts...

Nuxt ui drawer set z layer to lower than that of another object?

I have a bottom menu stuck to the bottom of my screen on mobile and I want to use a drawer component as a sub menu which slides in from underneath this bottom menu. I tried manually setting z-10 on the UDrawer and z-20 on my bottom navbar stuck to the bottom of the screen on mobile however the drawer is always above it. is there a way to do this?

Issue with @nuxt/content markdown processing involving mixed HTML and plaintext

Hey! I am making a blog using @nuxt/content. One problem I've run into is that when I mix HTML and plain text in my markdown files, the HTML "eats" the plaintext below it. I could simply avoid HTML, but the reason I'm bringing up this issue is because it's ALSO happening when I use Vue components within my markdown. I have created a Vue component which is pretty much essential for how I plan to set up my blog, so I would definitely like to get this sorted. I have tried searching, but I'm not totally sure what keywords to even use. I've also tried asking AI, and it wasn't helpful either, though it did seem to think it was not @nuxt/content specific? I would love it if somebody could at least give me a lead to follow to find the source of this problem. I will post a version with my custom Vue components, as well as custom beforeParse plugin, if necessary. But that might take a bit of time and effort to get a reproducible example on codesandbox, so I'm hoping the following example is enough: https://codesandbox.io/p/devbox/currying-violet-dzy4n3?workspaceId=ws_Phyvisc1F78GerdH9AzfWs...

change default name from "nuxt-app"

Hi, where do i change the default name from "nuxt-app" to something else? I tried to do it in nuxt.config.ts using
app: {
head: {
title: 'My new site name',
app: {
head: {
title: 'My new site name',
...

Prerender not completing, no errors — possible runParallel issue?

Hey everyone, I'm having some trouble with Nuxt's prerendering and I could use some help. Sometimes, when I run the prerendering process, it doesn’t complete correctly — but it also doesn’t throw any errors. I'm using the prerender:routes hook and have crawlLinks set to false. ...

Can't run a new project

I've been coming back to Nuxt for months, and I try installing a starter project, only to get this. it has never happened before, so what gives?
No description

Conditionally render items on Dropdown (Nuxt UI v2)

As the title says, how can one conditionally render items on a dropdown? I got some users that are on a "trial" account and want to hide some buttons. Code: ```ts...

Break line on UTooltip

This might be such a dumb issue but i'm unable to break line in the #text slot of the Tooltip component, more specifically in the v-else. This is my code: ```tsx <UTooltip :popper="{ placement: 'top' }"> <template #text>...
No description

Nuxt-security scanning all emojis as images? causing laggy emoji picker

Hi I installed the nuxt-security module and I'm using its default confid. I also have nuxt-emoji picker however when i open and close the emoji picker it's very laggy as I assume nuxt-security is treating every single emoji as an image it has to check? but inspecting the page in chrome the emojis are just emojis not images. Is this expected behaviour or is there a way to exclude emojis from being checked?