Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

postcss error (tailwind)

Pre-transform error: [postcss] postcss-import: C:\Users\facun\OneDrive\Documentos\dialoge\node_modules\tailwindcss\lib\index.js:1:1: Unknown word "use strict" Plugin: vite:css File: C:/Users/facun/OneDrive/Documentos/dialoge/node_modules/tailwindcss/lib/index.js:1:0 1 | "use strict"; | ^...

Is this package legit?

I was looking for the pinia persisted state. However, i couldnt. The only thing left is the next: pinia-plugin-persistedstate 2k in github for such a popular package isnt very convincing. Is this package legit?...

Cloudflare automatic deployment fails

I suddenly started receiving this build error. It works locally but fails if it is building on cloudflare.
No description

nuxt generate throw:ERROR Exiting due to prerender errors.

My nuxt3 project runs well in the development environment,but when I run
nuxt generate
nuxt generate
it throw error as image show. There are too few details in the log prompts to track them.and project is quite complex, I can't provide a reproduction. I only know when I modify the
ssr:false
ssr:false
in
nuxt.config.ts
nuxt.config.ts
,it can generate normally,but I don't think this is the solution to the problem because I need ssr.Has anyone encountered the same problem as me?...
No description

Loading in large dataset

Hi, I currently have a huge .json file (40mb) which I'm trying to import. const { default: availableCities } = await import('~/assets/cities.json') ...

Nuxt 3.15.4 SSR Application - Soft 404's in Google Search Console

Hello, We're experiencing a surge of Soft 404's in Google Search Console on our Nuxt 3.15.4 SSR application. Here's what we know;...

Is it possible to use 'hydrate-never' with '<component :is="....' ?

Is it possible to use 'hydrate-never' with '<component :is="....' ? When we tried using it like this the 'hydrate-never' part got ignored and it was working the same as before. Is there any workaround for this ? We would like to use dynamic pages/components with the new delayed hydration feature.

Difficulty Integrating Drizzle Database with Nuxt

Hi, I’m a comp sci 3rd year student. I am creating a visualisation tool for volleyball match statistics. I am at the stage where I wanted to integrate the database with drizzle (because i heard it’s good) but I’m struggling to integrate it. I have the sql script set up but it isn’t fully working and im not sure why (I’m sorry i don’t have more detailed info) Every tutorial I’ve found seems to be slightly outdated and as a beginner I don’t fully know how things should work. ...

Issues with Nested routing

Hello, I am having hard time with nested routing. I have roles, guest, user and admin roles, and want to restrict guest from accessing user and admin routes, once logged in restrict user from accessing admin's routes and vice versa. I have added middleware to index.vue inside the folder but it only guards index file. I am looking for middleware guard all the files in the folder. ...

Mocking auto-imported server utils in tests

I have a server util that uses a nuxt auto import. So there is no import { dbQuery } from './db' in my util that I want to test. In my .test file, I thought I could do: ``` vi.mock('../../../server/utils/db', () => { return {...

nuxtui custom background color on homepage

How would I override the default background color on only the homepage? I am using nuxtUI v3

Forced typesafe body

Has anyone tried to make inferable typesafe body using nuxt $fetch? Most of the methods I tried did not work. The only one that seems promising is a wrapper around defineEventHandler that pollutes response There is a simple prototype:...

What's the best approach to maybe redirect navigation after fetching data?

Imagine that the result of an API call give you a hint on whether the user should be redirected or not. Would you do it inside middleware? useAsyncData? Other hooks?

how to have a playground page in a nuxt layer

how to have a page in a nuxt layer just to test things out but not include it when used another nuxt app?

How to start fetch only when two variables in watch true?

I need to call fetch only when both values are available (not undefined) ```ts const {} = useAsyncData( 'tours-available-dates',...

Help with v-on functions

I have a button and when i click that, I need to call the function foo and pass 45 as an argument.

debugging sever with chrome inspector

Why for the life of me isn't my debugger connecting? I run node --inspect-brk --enable-source-maps node_modules/nuxt/bin/nuxt.mjs dev --cwd=apps/equipment-manager/ and then chrome://inspect in my browser. I inspect and I jump into the debugger, press play, but breakpoints on my vue pages don't hit. SSR is enabled.

nuxt-og-image - Failed to load empty.mjs from unenv

I started getting this error out of thin air after trying to launch my nuxt project in dev mode today ``` [nitro 3:37:29 PM] ERROR Error: Could not load /Users/krists/Desktop/Projects/[redacted]/node_modules/unenv/dist/runtime/runtime/mock/empty.mjs (imported by node_modules/nuxt-og-image/dist/runtime/server/og-image/satori/instances.js): ENOENT: no such file or directory, open '/Users/krists/Desktop/Projects/[redacted]/node_modules/unenv/dist/runtime/runtime/mock/empty.mjs' ...

Nuxt 3.15.4 vitest 3.0.8 not reporting coverage for .vue files

```ts coverage: { enabled: true, all: true, include: ['app', 'emails', 'i18n', 'server'],...

Help with images

If I want to display images, do i save the files in the public directory or the assets directory?