Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

How to exactly use nuxt-bridge

I'm trying to use nuxt-bridge to make our application more compatible with Nuxt 3. I'm trying to follow the documentation but it is not very clear. I did the Nuxt and Vue updates prior to installing Nuxt bridge so thankfully I'm already on: - Nuxt 2.18.1 - Vue 2.7.16...

How do I set "site name" for a nuxt website?

On google search results the site name I get for my website is just my domain and then the domain is repeated again in the URL. Attached is SERP screenshot of TikTok Ads (I chose this example because TikTok Ads uses Nuxt and they are in the Nuxt showcase). In this example:...
No description

Nuxt Moudle Con't run "dev:prepare"

package.json ``` "dependencies": { "@nuxt/kit": "^4.0.3", "shiki": "^3.12.1"...

Debugging server routes with Node Inspector

Hi everyone 🙂 Currently I have a lot of heavy processing on my Nuxt Server API endpoints (Nitro /H3). I make calls to external API's and I chunk the promises to handle all of this. The problem I have is currently I have a bottleneck somewhere down my code, but I can't seem to find the problem with just console.log, How can I Debug my Nitro / Nuxt server endpoints with node inspect? I've tried nuxt --inspect but that seems to work only with the frontend side of Nuxt?? Correct me if im wrong....

:ui=What are the advantages of the UMain component?

What are the advantages of the UMain component?

Deploying to nuxthub, issue types prisma

Have this error:
Error: Could not load /home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client (imported by server/database/prisma.ts): ENOENT: no such file or directory, open '/home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client'
Error: Could not load /home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client (imported by server/database/prisma.ts): ENOENT: no such file or directory, open '/home/runner/work/wolfstar.rocks/wolfstar.rocks//server/database/generated/client'
i tried deploy the project using prisma with generated file

Nuxt 4 Layer (ui package) and TailwindCSS v4

I am creating a nuxt v4 monorepo template to help people getting started: https://github.com/Psycarlo/nuxt-supabase-monorepo-boilerplate It's a monorepo with apps and packages. I want to use tailwindcss v4 and shadcn-vue. ...

Slow build times in nitro server build

Hi! My build times of my Nuxt app are this, it is normal? The nitro server take too much time Client 6.66s Server 6.27s Nitro Server 56s...
No description

How to hide columns with UTable?

I'm trying with ``` <script setup lang="ts"> import { ref } from "vue"; ...

Custom error.vue only appears in development (Nuxtv4)

Hello, I am developing an app with Nuxtv4 and I made the error.vue at ~ along with app.vue, now in development it appears just fine. Also when I do pnpm generate and pnpm preview it shows yet in the actual build it shows the default one instead of the custom one I have this in its script ``` import type { NuxtError } from '#app'...

Unit testing my Nuxt server API routes with a mock SQLite db (NuxtHub)

I created a Nuxt 4 project with (currently) only a few API routes. I'm using the NuxtHub SQL Database (SQLite) https://hub.nuxt.com/docs/features/database to store user data and more. The db is using Drizzle ORM. I want to test my routes using @nuxt/test-utils and vitest. I followed the setup for the testing utils: https://nuxt.com/docs/4.x/getting-started/testing. The problem is that I want to simulate a mock SQLite database to test my routes but cannot find any documentation about this online. The tests should create a user before running the test and use that user to do the test. Then discarding the mock db....

Caching custom templates

Hello I am working on a Nuxt module that uses the addTemplate method to add some content. Problem is that generation of getContents takes around 10 seconds, is there any way to resolve it? My current idea is to manually write content to a file in ./.nuxt/cache/my-module, compare hashes of paramaters and either regenerate it or load it. Is there any better way to solve it?...

ERROR 500: obj.hasOwnProperty is not a function

I keep getting this pinia error even when am not using pinia
No description

Nuxt with tailwind and DaisyUI

Hi everyone, recently I tried to install Tailwind and DaisyUI. I followed the documentation https://daisyui.com/docs/install/nuxt/...
No description

Nuxt 3 passing data from server middleware to app middleware

I have a situation where I am verifying jwt token so if it is verified then i want to send Boolean value so i do certain condition, vice-versa. Passing via cookies is the only way or we can use event.context.isverified as Boolean in server middleware and get its value in app middleware as useState('isVerfied' () => false) I tried the useState but the value doesn't get reflected. Both middleware are global middleware...

Nuxt 3 Architecture Question: Separating Logic from Components

Hi everyone 👋, I’m in the process of refactoring my Nuxt 3 app and wanted to get some feedback on best practices. Right now, a lot of my components directly handle data fetching and business logic, but I’d like to move those responsibilities into composables for better testability and reusability. The idea is to keep components as “dumb” UI pieces and move logic elsewhere. For example:...

Backend resources

Hey there everyone, i have a problem which is i dont know how to make fullstack apps using nuxt maybe it sounds like a skill issue but i have always used nuxt server routes to fetch my apis from my main backend which is Laravel but now i want to use the h3 server and nitro to make my apps but guess what i dont know how to start docs are great specially for the nuxt server directory docs but i still feel that i need a big one tutorial or a resource that teach me all the way about nuxt backend and...

Nuxt 4 Migration, have build working, tests fail

I'm working on a migration to Nuxt 4, I've done the outlined file changes to be in the ./app directory. My build work and app seems mostly fine, tests however: ```ts Error: Cannot find module 'C:/Programming/leaderboard-site/app/vitest.setup.ts' Caused by: Error: Failed to load url C:/Programming/leaderboard-site/app/vitest.setup.ts (resolved id: C:/Programming/leaderboard-site/app/vitest.setup.ts). Does the file exist?...

How to cleanup/dispose resources in a plugin

Hello, I'm currently trying to implement PostHog in my website and I'm implementing it via plugins. Implementing the client plugin is easy, since it's just a .init call which loads their library, but using the serverside library is a little bit difficult, since you have to dispose of it when your server is about to be closed/destroyed. I know that with Vite, I can use the 'close' hook to dispose of it, but is there anything similar that I can do inside of a plugin, or what would the best way of doing it be? I want it to be a plugin since I want to be able to expose the instance to use it inside components and pages. I've seen others clearing resources in the app:rendered hook serverside since that's when pages are going to be rendered, but because the instance is not disposed off and is active when pre-rendering, the build process never finishes as it hasn't been properly disposed, and that hook isn't being called on prerender, so I'm a little bit clueless of what the best way of achieving what I want is....

Nuxt UI Pro license for open source project.

Hi Nuxt Team, I'm looking to migrate current Inspira UI docs from shadcn-docs-nuxt to Docus, but it requires Nuxt UI Pro. Since, Nuxt UI Pro is expected to be free of cost from September, how can I deploy without license till then....