Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Block an array of dates from Calendar

Hi everyone, this is my first time to the world of Nuxt. I'm here off the back of this tutorial; https://www.youtube.com/watch?v=DvcHPR0CVpc I've now learning about input Date, and have attempted the following to block specific dates from being selected. Max and Min works, and I can't pick dates as expected. But I'd also like to load an array of dates that are also blocked....
No description

Submit securely

OK, the tutorial I'm following at https://supabase.com/docs/guides/getting-started/tutorials/with-nuxt-3 says that I don't need to keep my db .env variables on the server, that putting them on the client is fine because of RLS. But I don't have enough confidence in my RLS skills to feel like that's a good idea. So I'm trying to adapt the tutorial to keep the logic server-side. That's necessary for proper form validation and stuff anyway, right? But without adding a third-party module for Form Actions, does Nuxt need to call an API route to send form data to the server for processing? That seems very strange to me after working with NextJS and SvelteKit and Remix, where form actions are a basic part of the framework....

Nuxt Layer auto import types automate

I created a project with a layer for my types. I have exported them and looking for a way to auto-import them instead of using import type { Hallo } from '../types/types/Hallo'; Inside the Nuxt config of the types packages I added this: ``` imports: {...

.nuxtignore

Can i use .nuxtignore for a static file in my server directory?

use .nuxtignore to serve static file from server

my goal is to make a static file inaccessible to the public internet and available for my server. Can I use .nuxtingore for a route at my server directory?...

SQLITE in production

The thing is - most apps dont have enough traffic to make necessary real -con current writes. And with the command PRAGMA journal_mode = WAL; for concurrent writes with sqilite I really dont understand why I should use it in a project. (Disclamer for nerds) I want to use sqlite in my nuxt application. Figured out the easiest way to deploy is within the server directory. Is the server directory accessible from the public internet? Will nuxt break if i put a file .db in this directory? Ideally I want a location where apis can read from and since sqlite only manages file permission I must place the .db file in a path inaccessible form the public internet....

Difference between server plugin and server route middleware

Hi @kapa.ai I want to run a function that get's the location of the user form the request (provided by cloudflare). I am using const event = useRequestEvent() which would return value on server requests and undefined on browser navigation. It works in /middleware/location.global.ts I can get the context.cf out of useRequestEvent() and update pinia store value and use that on subsequent client side navigations. It get's updated after reload or other server requests....

Nuxt Content didn't deploy to Netlify, static generation broke my server routes, I fixed all tho.

Hey! I've been working for a while to move my old website from Nuxt 2 to Nuxt 3 completely, rewriting every component and reworking on all the modules, scripts, functions I have. I recently completed the move and everything seemed to be working fine until I deployed my app on Netlify... At first I tried a static generation but then I realized I should be using a normal build as Nitro can deploy to Netlify quite well. But then I realized the posts won't load during SSR for some reason. I couldn't reproduce on my local machine when running the project in dev mode but then I decided to set { server: false } in my useAsyncData and realized it doesn't work... It works when I move from another page to that page but it doesn't work when I refresh the page, so I think it has something to do with Netlfiy and SSR in Nuxt....

Cannot compile

Package import specifier "#content/server" is not defined in package ../package.json imported from ../.nuxt/dev/index.mjs

Can't access values from useRuntimeConfig() from /plugins

Can't access values from useRuntimeConfig() from /plugins ``` runtimeConfig: { LOADED_MESSAGE: process.env.LOADED_MESSAGE, }...

useRuntimeConfig empty in wrangler local preview

I am trying to read out some env vars that are present in .dev.vars and therefore in event.context.cloudflare.env. However if i try to access those secrets using useRuntimeConfig(event) they are empty. I can clrealy see that wrangler is passing them together with the request. preset: cloudflare-module nitro version: 2.11.0-20250115-115413.749f035d ...

Proper way of handling image uploads

What would be a good way of uploading images directly to the /public/images folder ? I currently have set up a cropper component that allows me to crop an image before saving it, and after saving it, it returns a base64 encoded image. Im kind of lost on how to save it to the public folder part though

How to cache API requests on the server side?

Hey guys, I've recently come across a problem where my server is making 4-5 calls to the API server on every request that comes to the Nuxt app. As a result, Nuxt takes a long time to respond to a user, as each API request needs to travel to another part of the world. I want to avoid this behaviour by leveraging caching, and storing API responses periodically. I've seen multiple solutions, including useFetch's getCachedData option, but they all address client side caching, while I need a solution for server-side caching....

has anyone here managed to use Nuxt with InstantDB's admin SDK?

i've been trying to set up InstantDB in a Nuxt project, but whenever i import/use any of the exports of the admin sdk server-side in Nuxt (nitro), the app crashes. here's a repro (in Nuxt): https://github.com/mareszhar/issue-demo-iasfins ...

HTML comment tags causing warnings/errors in .server.vue component

Whenever I create a comment (<!-- ... -->) in my HTML, I get an odd string of hydration errors that cause my app to crash. https://privatebin.net/?77ae5652841229d7#4nxzsmU7EeeAYnfou1YcobhsnZ9pLcpUeCEwbA8PQbfp This seems to be only occurring on server components, and still persists after deleting various temp directories, reinstalling packages and using different runtimes. ...

NuxtUI HorizontalNavigation

Hi, I'm new to Nuxt and want to make a simple web app that stores and displays my school grades. I have chosen NuxtUI for UI components and started straight ahead with the header. Currently my code looks like this: ```html <script setup lang="ts">...
No description

Redirect from server handler

Hi, I wonder if it's possible to call useFetch from FE and BE will redirect you to other Nuxt page like this This doesn't work for me (Should it?) ```ts...

Missing “#app-manifest” specifier in “nuxt” package

Hello, I’m currently running into this issue while starting a Nuxt project: I have just attached an image for reference....
No description

Nuxt Generate with BaseUrl

When I run nuxt generate and then start it with NUXT_APP_BASE_URL=/dash/ npx serve .output/public all the requests still go to http://127.0.0.1:3000/... instead of http://127.0.0.1:3000/dash/.... I have the same issue when using static images, when i use the following code: ```html <div...