Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Uploading, storing and displaying images

Hello everyone. Im a bit stuck on how to correctly create a system for uploading, storing and displaying images on my website. In the first iteration of this project, i was using regular vue and uploaded images directly to the public/ folder, which worked absolutely fine, but as i read, this wont work for nuxt, as nuxts server wont be aware of the changes. I dont want to use some cloud service and would like everything to stay directly on my machine. What would be a good/the best way of sorting this out ?...

How to delay validation until the submit button is clicked in UI V3 ?

It seems like there is only possiblity of validating in either of blur, change, or input events. But I wanna do it on submit Event only.

Auth flow secret encryption

I'm implementing a simple password authentication registration, using nuxt-auth-utils and nuxt-hub. I’d like to enforce email verification before completing the actual registration. Here are the steps on the client side: - 1 The user enters their email and requests an OTP. - 2 The user enters the OTP and verifies it. - 3 The user enters a display name. - 4 The user enters a password and registers....

Is it possible to prerender all pages in ~/pages?

Is it possible to prerender all pages in ~/pages without having to specify them directly in the nuxt.config.ts file?

How to fix nuxi dev issue from 3.7.0 update?

I've been struggling with a serious issue related to 'stalling' during development for some time now. I've been experiencing it since the 3.7.0 update—it wasn't too troublesome at first, but as the site grew and I now have tons of components, I decided to address it, yet no solution seems to work. I connect to the server via VS Code, PORT=7001 yarn run dev, and depending on the version, the site either runs lightning fast or extremely slow: 3.6.5 works fine, 3.7.0, 3.9.0 and above works terrible. ...
No description

How to do SSG and still build an API server?

I would like to serve the view of my nuxt app on a static CDN with pre-rendered HTML, while having the API server available on serverless functions.

Nuxt 3 SEO deep-dive

Hi! I would like to dive deep into Nuxt 3 SEO in the coming months, and I'm wondering what you would suggest for someone who has zero experience with SEO, where to start? What roadmap would you take to really learn to understand Nuxt SEO? I've been programming for 1,5 years, working with Nuxt 3 for 1 year. Looking forward to hear your thoughts!...

End-to-end typesafe for API not working in nuxt 4

Hi, I tried to upgrade to nuxt 4 to get a better code structure, but the end-to-end typesafe for API route is not working any more as soon as I move code to the app folder. Before: nuxt3 https://github.com/CodyBontecou/nuxt-e2e-typesafety After: nuxt 4 https://github.com/phi0411141/nuxt-e2e-typesafety API in app/app.vue now has type unknown. Any help is appreciated, thank you a lot!...

Use crypto server side in nuxt3 (3.8) with node 18

Hi, how can I use crypto server side in nuxt3 (3.8) with node 18 ? There is a recommendation for a server side plugin, but this isn't working: ``` plugins/crypto.server.ts...

How to mock/test useCookie with Vitest & Vue Test Utils?

Looking to mock or test a cookie that has been set

Best practices for loading nuxt-i18n from an API / CMS

Hi everyone, I'm working on a Nuxt 3 e-commerce project based on a MACH architecture. My goal is to load translation dictionaries from Strapi (CMS) into Nuxt's i18n configuration efficiently. My setup: ...

custom nitro plugin is not running in cloudflare-pages

i have a custom nitro plugin, is not running in cloudflare-pages. ``` import { accountManager } from "~/server/utils/user/accountUtils"; ...

how to use node:crpyto in a cloudflare-pages application

how to use node:crpyto in a cloudflare-pages application

Priority of executing server middleware register using module functionality and using project server

I have such problem: i have install module and it have server/middleware functions. I also using project server/middleware directory... When I'm trying to get event.context which was defined by module middleware i seeing empty object cause module middleware runs after server middleware no matter of index in the start of middleware file name...

NuxtHub failed deployment

I can't seem to figure out what this error means, and how to fix it
Error: Error while publishing deployment: "Error: Failed to publish your Function. Got error: Uncaught TypeError: Object prototype may only be an Object or null: undefined\n at chunks/nitro/nitro.mjs:13:87283 in Tn.exports\n at chunks/nitro/nitro.mjs:13:470601 in require_stream_readable\n at chunks/nitro/nitro.mjs:13:486480\n at chunks/nitro/nitro.mjs:13:486746\n"
Error: Error while publishing deployment: "Error: Failed to publish your Function. Got error: Uncaught TypeError: Object prototype may only be an Object or null: undefined\n at chunks/nitro/nitro.mjs:13:87283 in Tn.exports\n at chunks/nitro/nitro.mjs:13:470601 in require_stream_readable\n at chunks/nitro/nitro.mjs:13:486480\n at chunks/nitro/nitro.mjs:13:486746\n"
...

Nuxt /server api databse connection

Hi I am new to writing server side stuff with nuxt and I was just working on my first api and I got stuck on where should I initiate the connection to my database. I don't want to create the connection each time an endpoint is called I don't really like that and I want to do things the right way. So what is the right place to initiate the database connection?...

nuxt ui inputmenu breaks tab behavior!

```ts <script setup lang="ts"> const searchTerm = ref(''); const { data: items, status } = await useLazyFetch('/ac', {...

Hydration mismatch in Nuxt UI

Using
<UInput/>
<UInput/>
...

no .output files

I'm building with these build scripts: ```json "scripts": { "build": "nuxi build --preset=cloudflare_pages",...

[Vue warn]: Property "buttonClass" was accessed during render but is not defined on instance.

I'm trying to build a component library in TypeScript and Composition API in a mono-repo using https://github.com/nuxt/module-builder. When I build the component library using "watch-mode", nuxt-module-build build --stub, and use my components in another package of the mono-repo, everything works fine. But when I try to build the component library using nuxt-module-build build, I get [Vue warn]: Property "buttonClass" was accessed during render but is not defined on instance. when the comp...