Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

mountSuspended & useCookie

Hello. Why my test show incorrect value for cookie? Log: Mock useCookie with value 0 Mock useCookie with value 1 ...

shallowMount & await useAsyncData

Can I use shallowMount instead mountSuspended if my component contain next code:
await useAsyncData('layoutGetCurrent', () => locationStore.getCurrent())
await useAsyncData('layoutGetCurrent', () => locationStore.getCurrent())
...

Hydratation text mismatch on

Hello i have an issue i can't fix it. i have an hydratation mismatch on the component PartOfferCard when i want to display the dateStart Parent component where i get the datas ```js...

nuxt webiste not working

when i try to go anywhere besides the landing page i get error 500 "500 Error Couldn't resolve component "default" at "/docs""...
No description

how to slow down loading screen

i need slowdown loading screen, the loadin screen must be showed 2 second spaloadingtemplate

NuxtPage default page

Is it possible to define the "default" page within a page in the app/pages folder and also have a <NuxtPage /> to render children? I don't want to create a bunch of index.vue files in the children folders

Module playground not starting (too many open files)

I am currently writing a Sanity integration for Nuxt.js 3 based on @nuxtjs/sanity by Daniel Roe. Sadly, the dev server (playground) stopped working after updating to the latest Nuxt version. The server crashes with error message EMFILE: too many open files, watch. I tried adding the Sanity Studio directory (cms/**) in Vite's server config, but this couldn't resolve the issue. The only solution I've found is moving the Sanity Studio out of the playground directory. Is there any other way I can ignore the directory from being watched by Vite? Thanks in advance!...

Import based on .nuxtignore

Hello, I use .nuxtignore inside my app, which inherits from another app (layers). I would like to ask if it is possible to import a component only if it is not ignored? resolveComponent work almost fine but it raise console warning ;/

[Vue warn]: App already provides property with key "Symbol(pinia)". It will be overwritten with the

Hello. My test: ```typescript import { describe, it, expect, vi } from 'vitest' import { createTestingPinia } from '@pinia/testing' import { useLocationStore } from '~/store/location'...

Hydration mismatche

@kapa.ai i have a problem with nuxt ui accordion on hydration mismatches hook.js:608 [Vue warn]: Hydration attribute mismatch on <div id=​"headlessui-disclosure-panel-v-0-5-19" data-headlessui-state class=​"text-sm text-mgp-slate-500 pt-1.5 pb-3">​…​</div>​ - rendered on server: id="headlessui-disclosure-panel-v-0-5-19" - expected on client: id="headlessui-disclosure-panel-v-0-0-19"...

`#shared` types. Failed to resolve extends base type.

I'm trying to use the new #shared functionality and have a ./shared/types/Budget.ts file that exports multiple interfaces. I can successfully use them automatically in my code and VSCode knows about them. However, when I run the nuxt app, I get Internal server error: [@vue/compiler-sfc] Failed to resolve extends base type.

useAsyncData & unit-testing

My component contains:
await useAsyncData('layoutGetCurrent', () => locationStore.getCurrent())
await useAsyncData('layoutGetCurrent', () => locationStore.getCurrent())
...

What's causing the api call error when using composables?

I have this code ```js // Fetch users data const { data } = await authRegister(form.value);...

New to Nuxt: should I do all data fetching in Pinia?

should I put all data fetch operations into Pinia to reduce code duplication? what are the pros and cons of this?...

Worker env access

I'm building a web worker to post activity tracking to our API, although it doesn't seem like the worker is getting access to any of my environment variables. Some context: - Worker is stored in /assets/js/activity.worker.js - Worker is exposed via plugin which imports worker using suffix import ActivityWorker from '@/assets/js/activity.worker?worker - import.meta.env has the following value in worker: ```...

[Solved] Implementing Layers In Existing Project

I have an existing Nuxt project and I am trying to understand how I implement Layers in it. This is my nuxt.config ```js export default defineNuxtConfig({ devtools: { enabled: true },...
No description

How to make prefix on FormKit?

How to make prefix on FormKit? without using formkit icon module

Nuxt Icon

Nuxt Icon discovered local-installed 4 collections :..... I use a different collection from @iconify-json ! How to remove the other ones please ?

Advice for creating and managing standalone script

I’m thinking of creating a standalone widget script that users can add to their website’s <head> to show some stats from our platform. Ideally, I’d like to keep it within the same Nuxt repository as the platform to make maintenance and deployment easier. Planning to do even more widget scripts and heavy DOM manipulations in the future, so looking for something that will make my life easier. I looked into Petite-Vue, but it seems unmaintained. I also came across Atomico for web components, but I’m hesitant to dive into a new API like that without being sure it’s the right fit. I’d really appreciate any advice or suggestions on the best approach to take here!...