Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

useFetch中的 参数为什么是空的?

const {data, refresh: getAddAccount }= GetFetchApi('/manage/admin/add',{ lazy:true, server:false, immediate: false, body: {...

Custom UIcon doesn't change

My Nuxt UIcon isn't changing the color

What is the best way to change HTML attributes before the page renders?

I am trying to create a dark mode / light mode toggle for my website using localStorage. I set up a plugin and used useHead() function to set the attributes but that caused light mode to be flashed. I asked Claude what should I do and it sent me this: ```ts export default defineNuxtPlugin((nuxtApp) => { ...

How to avoid the caching mechanism in Nuxt 4?

Project Application: Admin Management System Scenario: I need to add a new item to a list. Code Logic Description: First enter the page → call the pagination API....

Nuxt 4.1.1 > Causing tree shake error

This was OK on 4.0.3 but now on build im getting an error ive never seen before; ```onMounted(() => { if (import.meta.client) { const mediaQuery = window.matchMedia('(min-width: 960px)')...

Nuxt UI AvatarGroup Tooltip

Hi, we are using v4 with an avatarGroup tooltip ``` <UAvatarGroup v-if="sharedUsers.length" :max="3"...

Nuxt auth utils cookie compatible

I have a 3rd party api which authenticates with cookies. Does nuxt automatically provide a fetch function which includes the cookies from that domain?...

Pinia & Nuxt4

Is pinia not compatible with nuxt4 yet?

Env variables not working

Using Nuxt 3.18.1. Hi! I've been struggling with an env variable. I can't seem to make it work when running the preview (npm run build && npm run preview). Locally, it works as it should. Basically, I want a variable to be true on dev and false on prod. For testing purposes, I have it set to true in .env.production, so I can see in an if statement if it works. Here's my current code: .env.development: NUXT_PUBLIC_USE_MOCK_DATA=true .env.production: NUXT_PUBLIC_USE_MOCK_DATA=true...

According to the doc, useFetch.data should be a ref but it's a computed?

const { data: posts } = await useFetch<{ results: object[] }>(
'https://jsonplaceholder.typicode.com/posts'
)
const { data: posts } = await useFetch<{ results: object[] }>(
'https://jsonplaceholder.typicode.com/posts'
)
...
No description

Is floating-vue Nuxt4 compatible?

Following the Nuxt3 installation process described here: https://floating-vue.starpad.dev/guide/installation#nuxt-3, I am trying to use akryum/floating-vue v5.2.2 (the lastest) in a Nuxt4 environment but nothing works as expected.
Cannot read properties of undefined (reading 'trim')
Does anyone here use it in a Nuxt4 environment?...

Nuxt PWA Fails Installation on Chrome Android, Works Fine on Desktop Browser

I'm struggling with a PWA (@nuxtjs/pwa) installation issue specifically on Chrome for Android, and I'm hoping someone here has run into this before. My Nuxt app's PWA functionality works perfectly on desktop Chrome and Firefox (I get the install prompt), but I cannot get the prompt to appear on Chrome for Android. Manually pressing the "Add to Home Screen" button on chrome android just create a shortcut, no option for install this app. - I have tried using Ngrok for https, same result - In DevTools (Application > Manifest), the manifest is fully parsed with no error or warnings. ...

Nuxt chunking error when build (v4.1.1)

I got build error after upgrade to nuxt 4.1.1
Nuxt Build Error: [nuxt:tree-shake-composables:transform] Cannot split a chunk that has already been edited
Nuxt Build Error: [nuxt:tree-shake-composables:transform] Cannot split a chunk that has already been edited
After debugging, i found that the affected parts are normally arrow functions (either async or not) passed into onMounted...

Module '"#components"' has no exported member 'UFormGroup'

Trying to solve this issue where this will flood my consoles a lot: ``` [Vue warn]: Failed to resolve component: UFormGroup If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. at <Register onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< null > > ...

asRobotsCollection vs asSitemapCollection

should I use asRobotsCollection and asSitemapCollection together?

Where does sitemap info from nuxt/content go?

I configured my page as escribed here: https://nuxtseo.com/docs/sitemap/guides/content. Is the sitemap.xml file automatically generated? if yes, under which path is it populated?...

Cannot read properties of undefined (reading 'nuxt2Context')

I'm trying to enable nuxt bridge on my app. I have: - Nuxt 2.18.1 - Vue 2.7.16 I've installed bridge and configured it like this:...

Nuxt studio cannot access preview

I cannot access preview on Nuxt studio, I already have mine deployed I could see the __preview.json file with data but when I try and navigate to the ?preview=<id> it goes into loading loop with an error of: Uncaught (in promise) SQLite3Error: SQLITE_ERROR: sqlite3 result code 1: no such table: _content_pages. I opened my contents.sqlite file I could see that the table _content_pages is present with data anybody have encountered this issue?

Cannot read .vue files of external packages

Hi, I encountered a problem when registering a package's exported SFCs with a nuxt module:
Unknown file extension ".vue" for path/to/SFC.vue
Unknown file extension ".vue" for path/to/SFC.vue
...