Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Environment dependent middleware

Is it possible to create a server middleware that is not deployed in production? Specifically I am deploying to CloudFlare and do not want to use my access log plugin that uses morgan.

WebSocket connection to 'ws://localhost:24678/_nuxt/' failed

Hey, I've just restarted working on my side project. Started a project from scratch, didn't change anything, and as soon as I visit localhost:3000 I just get the same error over and over. I did it from scratch as I was having the same issue on an already existing project that I tried to upgrade to Nuxt latest version. Starting a new Nuxt 3 project in Stackblitz is also not working and I am wondering if these are related to each other (https://stackblitz.com/github/nuxt/starter/tree/v3) ...

How can i use VisLine with tooltip?

i trying use unovis to add charts to my project but i see VisLine not work with tooltip please help me solve it...

Nuxt 4 nightly failing on nuxt prepare command

I have followed the guide for opting in to the Nuxt nightly and using future.compatibilityVersion: 4, did this on a brand new clean project just installed with npx nuxi@latest init nuxt-app, however, after running yarn to install new packages, the nuxt prepare command fails with Cannot read properties of undefined (reading 'bind') at loadNuxt This seems to stem from the @nuxt/kit package, specifically this line: nuxt.removeHook || (nuxt.removeHook = nuxt.clearHook.bind(nuxt)); Both nuxt.removeHook and nuxt.clearHook are undefined....

option api - useNuxtApp

Hello, I’m migrating bigger project from nuxt2 to 3 🙈, and I found out that I don’t know how to call plugin in option api. The plugin looks like this: ```jsx...

How to add new hooks to Nuxt from a module?

Is there a place in the docs that shows how to add new hooks from a module so the module users can hook into it and extend it? Thanks...

Express compatible request object

Is there an Express compatible request object available from a server route? I am trying to integrate samlify and it needs to parse the request but it seems the nitro request object is incompatible.

Rive animation in my Nuxt project causes a lot google speedtest issues

I have a Nuxt 3 project which I want to add an animation to on the homepage. I get a lot of performance issues with google and I truly do not know how. The speedtest performance issues are in an image I attached to this post. I also added my home-page vue file and my nuxt.config.ts, I think something is wrong with the configuration or something else. I really appreciate the help, I am so lost on this....
No description

How to cache this (authenticated) ?

I am using NuxtHub. I mean this : const { user } = await requireUserSession(event) give me problems. ```typescript import type { H3Event } from 'h3' ...

Create new v4 app

I'd like to play around with whats out there for v4, how can I create a new application immediately using v4?

How to close programmatically opened nuxt ui modal from within the modal

I have a modal that opens like this: modal.open(SomeModal, {onClose() => {console.log('closed')}) When clicking outside the modal, it console logs properly, however, when I call modal.close() from inside the modal it does not....

Noob question - How to read .db file in production?

Hi! I'm working on a website that displays products based on a sqlite .db file. It works in dev mode but after deploying the pages can't seem to access the .db file....

Nuxt content, load images from the assets dir?

Hi! I am reorganizing all my project files and wanted to know if it would be possible to load image files from the assets folder from nuxt content? ```yaml title: Looting items description: 'Items can be looted when defeating mobs. The same item can be looted on various mobs but the chance to loot them can vary depending of the mob.'...

Typescript types for server errors

For API requests I wrote a little script to fetch data from a server. It works, but for statusCode and statusMessage my editor is yelling at me that the property does not exist on type 'Error'. I get the feeling that I need a special type for server errors, because similar code is no problem on e.g. components, but I can't figure out what I need to do to make my editor happy....

Nuxt 4 - layers vs vue-tsc

Hi 😉 I'm playing with layers in a nuxt4 compatibility, monorepo based project and I have a small problem.... I have a layer from which I extends (events) and the application in which I extend doesn't see the server routes (404 error) and in addition vue-tsc I am throwing errors - do you have any idea what to pay attention to or what I am doing incorrectly?...
No description

Nuxt 3 Importing one SCSS File imports all scss file in the folder

Hello Guys, i have quick question. Im importing a scss file in the app.vue based on the domain. The strange thing about this is when i do the import it imports every scss file in this folder and if i delete the import line and refresh the page the .scss file are still imported. I dont unterstand it...maybe someone can give me a idea where the problem is. app.vue ``<script setup lang="ts"> import(~/assets/domains/styles/${config.public.currentDomain.theme}.scss); // will be something ~/assets/domains/styles/mydomain.scss`...
No description

Internal server error: ENOENT: no such file or directory

just started a fresh project with pnpm dlx nuxi@latest init <project-name>. installed all dependencies with pnpm i and ran the dev server. I got:
ERROR Internal server error: ENOENT: no such file or directory, open '/node_modules/.pnpm/vite-plugin-vue-inspector@4.0.2_vite@5.2.11/node_modules/vite-plugin-vue-inspector/src/Overlay.vue'
ERROR Internal server error: ENOENT: no such file or directory, open '/node_modules/.pnpm/vite-plugin-vue-inspector@4.0.2_vite@5.2.11/node_modules/vite-plugin-vue-inspector/src/Overlay.vue'
do i miss anything?...

Nuxt 3 Modules provide Types to Nuxt Applications

What is the recommended way to provide types from a nuxt 3 module to a Nuxt App so that the App can import it using something like import type someType from "@company/myModule"? Ways I found: 1. export all types inside the module.ts 2. wrap the type exports into a export/declare module "@company/myModule"...

How To Change UButton Label Color?

I'm using dark mode by default and set my primary color to purple. I don't like how the default color for my labels are set to black by default. I want to change this to white. How do I override this through configs?...

Auto-import Component from node_modules

Whichever way i try i get an error "does not provide an export named 'default' / 'string'" or the Icon Component remains unresolved. 1. The module registers. 2. Importing manually in vue works 3. I tried with and without resolver (resolve('../node_modules/@iconify/vue')),...
No description
Next