Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Is there a way to get an element from the dom as writable with typescript support

I want to retrieve a DOM element in Nuxt but the only way I've found online is using ref(null) which does not work TypeScript. Any advice as to how I can retrieve an element like such in Nuxt?

Issues with Directus Cms and Nuxt

Also, I am a bit of a beginner at directus and I am using the How to use directus cms with Nuxt, and when I run my project I am getting these erorrs ARN [Vue warn]: Failed to resolve component: UApp If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. at <App> at <NuxtRoot> ...

How to use click handlers instead of 'to' in UNavigationMenu items

Also posted on GitHub Discussion How to use click handlers instead of 'to' in UNavigationMenu items Description...

Can I use nuxt ui without vue router

I'm building an electron app so there's not much use for a router. Trying to run without vue-router throws this error at runtime Uncaught SyntaxError: The requested module '/@id/__vite-optional-peer-dep:vue-router:@nuxt/ui' does not provide an export named 'useRoute' I can just install vue-router and not define anything but it'd be great if nuxt ui didn't depend on vue-router...

Nitro Websocket Cookies

Is there a better way to get the cookie from the open method than peer.request.headers.get()? This seems janky when I can normally just getCookie(event, ...), and parsing cookie strings is an annoyance

Questions About Database Migrations

Hi there everyone! I am building a Nuxt app that uses NuxtHub to deploy, and also uses it's database. I have read the docs on database migrations, but still have a few questions. For example, if I have a migration that creates a table, and another that modifies a column in a table, will the second one fail because the table does not exist, or will they run in order? If someone could point me to a guide or doc about migrations in NuxtHub that would be great!

Customize Routing Rule for Main domain and Subdomain(wildcard)

I have created a file app/router.options.ts for the subdomain ``` import type { RouterConfig } from "@nuxt/schema"; import { useRuntimeConfig } from "#app";...

Import file as raw string on a config file (UnoCSS config in this case)

I'm trying to import a css file as a string on a configuration file, in this case is for a feature of UnoCSS named "preflights" which lets you set up css for themes from strings, I'm using import globalCSS from './app/styles/theme-base.css?raw' within the config but I'm getting Cannot restart nuxt: Unknown file extension ".css" for <full file path> any idea on how to make the import work? I'm inlining the css instead of using the file as a workaround. Nuxt 4 compat. edit: fixed it by using normal fs from Node, looks like the module config doesnt go through vite...

Disable Extract CSS

How can I disable extract css?

nuxt ui pro content navigation not showing up

```<script setup lang="ts"> import type { ContentNavigationItem } from '@nuxt/content' const route = useRoute() ...

Nuxt content module: [error] Could not locate the bindings file. better_sqlite3.node

Hi I'm using pnpm package manager, I installed the nuxt content module however I run into this issue building locally and deploying. As a workaround locally I do
pnpm approve-builds
pnpm approve-builds
but I have the error on deployment too. So should i modify my deploy/build command to include this too or is there a proper workaround that's more recommended?

Using layers and (sub)domains.

Is it possible to use layers for subdomains? Like App.product.comb-> layer one Test.product.com -> layer two...

NuxtUI Pro - Github invite link expired

Hey, I missed the email invite to the GitHub. It has since expired. When I try to readd my account, it says the license ID has already been claimed. Anyone know who I can get in touch with to get another invite?

can you explain nuxt content with nuxt ui pro

I'm used to making a seperate page for a privacy policy, styling it etc and at most making css classes to reuse across reused sections for the terms of service page etc. can you explain nuxt content in addition to nuxt ui pro for a better way to go about this?

Memory overflow error when trying to load iconify icons dynamically

Hey all i am trying to add a nuxt site to my blog monorepo however a utility function that i wrote to extract iconify icons is causing the SSG build to overflow. The same function works well grabbing icons for astro, sveltekit, and nextjs however i am having issues with nuxt. I have done some research and think it might have something to do with how nuxt crawls and prepares the ssg bundle however i am not able to find a solution that allows me to use this function. If anyone has any insights or directions I should go down I am more than happy to explore. Appreciate any asistance...
No description

nuxt ui tailwind @apply in style tag for custom classes?

Hi, I'm making my privacy policy page with nuxt ui and tailwindcssv4, I have a lot of reused sections here so I made my own css classes like "policy-content-section" I now want to apply tailwind classes to these custom classes in the style section is this the right approach? as it seems none of these tailwind classes are being resolved and im getting errors. ``` <style scoped> .page-main-title, .section-title { @apply uppercase text-success dark:text-white; @apply border-b border-cool-300 dark:border-cool-700;...

How To: Downgrade 3.17.2 to 3.17.1

Hello everyone, I’m a complete beginner in development and I’m running into a MIME-type issue with @nuxt/fonts on NuxtJS v3.17.2. Can anyone share the proper way to downgrade NuxtJS from 3.17.2 to 3.17.1 without affecting my existing project? ...

Development mode component styles generate <style> instead of <link rel="stylesheet">

Is it possible to configure Nuxt in development mode to generate <style> tags for component CSS instead of a <link> ? I see this behavior in the production build, however, the development build always generates <link> tags for global CSS files and SFC styles.
<link rel="stylesheet" href="/_nuxt/assets/css/main.css" crossorigin>
<link rel="stylesheet" href="/_nuxt/pages/my/page/my-component.vue?vue&type=style&index=0&lang.css" crossorigin>
<link rel="stylesheet" href="/_nuxt/assets/css/main.css" crossorigin>
<link rel="stylesheet" href="/_nuxt/pages/my/page/my-component.vue?vue&type=style&index=0&lang.css" crossorigin>
...

navigateTo inside useAsyncData

I have this request in my SPA component: ```js const { data: product } = await useAsyncData('product-id', async () => { try { const response = await getProductById(1)...

nuxt ui toaster location won't change

```export default defineAppConfig({ toaster: { position: 'bottom-left', expand: true, duration: 5000,...