Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

tsx and i18n conflict, parsing error

https://github.com/nuxt/nuxt/issues/31172#issuecomment-2692085277 Hi, I would like to ask if anyone has encountered the same situation....

Hi! How to mockup multiples pinia stores?

I have this ts file that export a fn and this auxiliar fn uses two pinia stores, the "useProductionStore()"and the "useGlobalStore()": ```ts import type { ItemConvertedToActs } from '@/types/productions/summarySection' import type { RersourceResultType, PieData, PieLabels, ConvertedEqItemType, NonWorkItemType, ConvertedHrItemType, AcivitiesSummaryData } from '@/types/components/productions/typesComponentsProductionsSummary' import type { ActiviTyStatistcsType } from '@/types/resourcesTypes.ts'...

Nuxt content and nested route active links

I'm trying to use the document driven mode workaround with NuxtContent v3 with the catch all route [...slug].vue (https://content.nuxt.com/docs/getting-started/migration#implement-document-driven-mode-in-v3) I'm running into an issue with the router active class not being added to nested pages however. It seems nested vue router pages are not being created for nested pages in the content directory. Is there a way around that without having to define the nested routes in the pages directly as well?...

Hydratation mismatch when using lazyFetch

This piece of code gives me a hydratation mismatch, when removing the for loop that displays the users it's gone. ```js <script lang="ts" setup> import type { IUser } from '~/models/user';...

server route not being hit

I have a server route: server/api/dealer/[dealerId]/member/[memberId]/changerole.ts The below code always sends a request to another one, which I for the life of me can't find anywhere. This is what actually is called: server/api/content/index.get.ts : ...

Adobe Experience Manager (AEM) with Nuxt.

Have anyone worked with a combination of AEM as a headless CMS combined with a Nuxt frontend? And can share their experience. Is it possible to integrate the Nuxt app into the AEM editor so content creators can preview their changes directly inside AEM? Thank you!...

Trying to achive theme base routing in Nuxt3

I am using nuxt3, I want to achieve theme pages. my folder structure is like: - pages - (alpha)...

Nuxt 4 with Content Module v3 `nuxt.config.tx` issue

Using VS Code/Codium there is a nuxt.config IDE error when adding a content:{} section to the config. The error is as follows:
Object literal may only specify known properties, and 'content' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'.ts(2353)
Object literal may only specify known properties, and 'content' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'.ts(2353)
I'm currently using:...

Nuxt Studio Custom integration i need nuxt expert opinion

Hello everyone! I need your expertise, please! Basically, we're developing an ERP for restaurant owners, and the pitch is that they can create their own menu in the application using drag and drop. And I'm wondering if we could use Nuxt studio to do this and do we have to develop an internal component that would call the nuxt preview API to manage this or would it be possible to have an integration of the nuxt content project with nuxt studio to make a drag and drop and modification system like nuxt studio?...

Nuxt Content in a Nuxt Layers project basic setup help

I'm trying to use Nuxt Content 3.2.2 in a Nuxt 3.15 Layers project. I'm not seeing my markdown content render (or not being found really) and reproduced the basic issue here: https://stackblitz.com/edit/github-qygkyxfh. I'm trying to keep my markdown content in a layer called /blog with the project also having two other layers of /core and /site that holds other site components, pages, and layouts. I've tried following the Nuxt Content docs to set things up in my /blog layer with modules: ['@nuxt/content'] being added to my /blog 's nuxt.config.ts file and have the suggested content.config.ts file setup. Also have a /blog/pages/[...slug].vue file with code to hopefully match the route and serve up the proper markdown content. The markdown content does live in /blog/content and I think the markdown files have the proper setup. I'm expecting navigations to [site.com]/ to display components and stuff from my /site/pages/index.vue - which it does👍🏼. I expect hitting [site.com]/mypost would render content from a /blog/content/mypost.md file but looks like no content is found. Actually, when spinning up the dev server I do see that @nuxt/content says it processed 2 collections with 0 files. So my guess is I don't have the sourcing of the files set properly. I've tried defining the content collections with the help of AI in the nuxt.config.ts and content.config.ts files of the /blog layer but I keep getting outdated suggestions that don't seem compatible with the type checking that is happening. I also tried adding a /blog/pages/index.vue but that isn't what I want since it overrides my /site/pages/index.vue and I want to create url that matches the file name. I've also tried different variations of source like '**', '/blog/**, /blog/content/** in the defineCollection() of my content.config.ts file with no luck....
No description

NuxtUI Accordion Button color when open

Is there a canonical way to set the color of the Button components when they're in an open state without overwriting the entire default slot?

Overriding the default envName

How do I override the default value of envName from
process.env.NODE_ENV
process.env.NODE_ENV
to a custom environment variable?

Store usage/relevance with Nuxt 3

When working on my various Vue 2 projects (around 5 SPA web applications) I found Vuex incredibly useful. Namely, it provided a single place for my logic around interfacing with my .NET API, as well helping share state between components. However, as I've started writing more in Vue 3, especially given nuxt composables/plugins like $fetch, useFetch, useAsyncData, callOnce, useState, etc. I've found myself struggling to justify this default of 'relates to api data, put it in the store'. For instance, I'll have a card that needs some async data. If I load it in the card, I have access to the returns/capabilities of useFetch like watch, error, loading, etc. If i wanted that call in the store, i would need to expose each of these. Furthermore, my stores become a bunch of inline composables related to components....

Hydration Error

Hello Nuxt Gang. I have run into some trouble. I have a project I am trying to work on and I have been experiencing hydration errors recently. This is the error I am getting: ``` 500...

Ignore "type" for variables enum after build of module

I created simple enum: ``` file: module.ts export enum test {...

eslint and antfu config

Hey, I have a fresh new nuxt 3 project. I added a few modules, devtools, nuxt fontc, image icons and eslint. I also added antfu/eslint-config and i want o use this lint and stylistic. the es lint was working fine until i installed antfu/eslint-config and tried to use it. my dependencies: ` "dependencies": { "nuxt": "^3.15.4", "vue": "latest",...

Hydration and caching issues on universal rendering page

I have three issues on a page that is using SSR / universal rendering... 1. There are hydration errors — I'm guessing this is something I've misconfigured in the client-side code. Page code: https://github.com/seancdavis/qr-polls/blob/main/pages/polls/%5Bid%5D.vue 2. I'm curious why the initial response is empty. The docs noted that universal rendering had the benefit of SEO/prerendering + hydration, but maybe I'm thinking about this wrong?...

Do I need to rerun the build command for `runtimeConfig` items to reflect changes?

I have, for example: ``` runtimeConfig: { databaseUrl: process.env.DATABASE_URL ?? '',...

Full static still calls /api/

I have a full static setup, i have a module that ensures all routes i want it to prerender at generate as a static file is there. I still find that if my app is deployed it calls and api route even though i prerendered it. i tried to download the zipped folder from netlify to ensure my route is there and it is. ...
No description

useSeoMeta with i18n

Hello, I use useSeoMeta with i18n I have two languages : fr and en. ...