Josh Deltener
Josh Deltener
NNuxt
Created by Josh Deltener on 8/26/2024 in #❓・help
Is there a way to NOT show an HTML error from an API?
The recommended way of handling errors in Nitro/API-land is to use createError. When hit directly, these show a full html error page, or if hit with accept: application/json, show a json payload with stack info. I'd like to return a simple message on-error vs all that. It would seem the only option I have is to use setResponseStatus and return whatever directly from the api vs passing something to createError. IMHO, no matter what, an api shouldn't be returning full page html errors.
8 replies
NNuxt
Created by Josh Deltener on 7/30/2024 in #❓・help
Does anyone know how to set the keepAliveTimeout for nitro in Nuxt 3?
We're having some large issues with AWS's Application Load Balancer and Nuxt 3, it seems to stem from node's default of 5s keepAliveTimeout.
13 replies
NNuxt
Created by Josh Deltener on 6/25/2024 in #❓・help
What's the right way to install Pinia?
The docs say to install pinia @pinia/nuxt, but @pinia/nuxt already has pinia as a dep.. (and we've been just using that for months) https://github.com/vuejs/pinia/blob/v2/packages/nuxt/package.json#L50 We're moving from yarn to npm and just noticed this diff. So are the install docs outdated, or is there another reason we're supposed to install pinia by itself along with @pinia/nuxt?
6 replies
NNuxt
Created by Josh Deltener on 4/10/2024 in #❓・help
File hashes change even when contents doesn't
We've been noticing when using Nuxt3/Vite, every time a build is created, all filenames change even if nothing has changed. Is this a vite? thing or a Nuxt thing? Is there any way around it? With Nuxt 2/Webpack the filenames didn't change if something didn't change so cache-hit ratios and website stability was better.
1 replies