Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Child page/component replace parent page/component?

I have a child page of let's say parent/. The parent page has a layout as well that adds a sidebar for matching routes. So I have /playground.vue...

Intellisense error when try to import package

I am trying to import the path library for my config, but after importing I get a long load of Intellisense in VS Code and subsequently import errors. How can this be fixed? npm install --save-dev @types/node does not help...
No description

Can I have SSG and SSR in the same project??

I have 2 projects to work on in a monorepo: the landing page & a website with auth and other stuff. The main website is a simple SSR application but I wish to statically generate the landing page. The problem is that they both have the same public/ folder (for fonts) and server/ folder because of the text on the landing depends on API call to my server.

Collapsible sections in Vertical Nav for NuxtUI?

Is there a way to have collapsible sections like the NuxtUI docs or even the Nuxt docs? Would it be an Accordion?

Error when using deployed version of Nuxt module with Sanity depdendencies

I am currently trying to use Sanity dependencies within a Nuxt module. The module works completely fine in the playground, but when deploying to npm, it breaks in my Nuxt 3 App. The server starts up and then throws "Cannot find module './cjs/react.development.js'" once a client connects to the app. I installed the module in the Nuxt app like this: ```json...

Keep default layout across all pages but use another layout that adds something on others?

Is it possible to have a default layout that includes things like a header/navbar and footer and that is used on all pages but other pages may add other components in their own layout?

Syntax highlighting in postcss style blocks

Did I miss something in the docs or am I missing something in VS Code that would enable syntax highlighting in postcss style blocks? I can use them and they work (though hot reload maybe doesn't?) but I lose the syntax highlighting. I just want to be able to use @apply Tailwind rules.

Dynamically load i18n messages based on context

I'm using @nuxtjs/i18n and was wondering if it's possible to dynamically load/switch messages based on context (in my case, context is organization). In my case, organizations are of different types/templates, and for some organization templates, I would like to switch the messages to use different terminology. I tried to achieve this using lazy loading: ```typescript...

When I click outside the modal it doesnt close. Why doesnt onClickOutside not work ?

```js <template> <div v-if="isOpen" class="fixed inset-0 z-50 flex items-center justify-center bg-coffee-900 bg-opacity-50"...

Nuxt SPA build not building nitro server

i have an app with nuxt that i want to turn into an SPA, since it's all behind auth i dont really need SSR. using npx nuxi generate with ssr: false does build the project as an SPA but my only issue now is that i have server routes but with this setup the nuxt build is not building the api nitro server at all, any ideas how to resolve that ? my workaround is to have two builds one for the SPA and the other for the server...

fetching data from database

is this correct way to get data? for some reason when i enter page console log doesn't print anything ```js const { data, error } = useAsyncData('getArticleData', async () => {...

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?