Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Nuxt Server crashes on production when a request fails.

Is there a reason on production when the server encounters an error it crashes? This behaviour does not follow what i would expect for an error not being fatal. ```js shad | 2106 | __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value); shad | 2107 | return value;...

ECONNREFUSED error when using Nuxt.js with @nuxtjs/supabase and Supabase Auth

Hello. I am using Nuxt.js with the @nuxtjs/supabase module to handle authentication in my application. However, I'm encountering an issue where token refresh requests and other authentication-related API calls fail continuously, spamming the logs with errors like this Here is the full error log:
``` ERROR Error fetching request http://127.0.0.1:54321/auth/v1/token?grant_type=refresh_token fetch failed...

Nuxt i18n - Nested Route translation does not work

Hi guys, I am using Nuxt i18n with the "config" option for the customRoutes... I have implemented the nested route example like it is implemented on the official documentation: https://i18n.nuxtjs.org/docs/guide/custom-paths#example-1-basic-url-localization However, the route url does not get translated, for all my root routes the translation works like a charm, however for example for my route called 'sukun' which will have a subroute called 'sukun/exercises', I have created a directory called 'sukun' and in there I have index.vue and exercises.vue, then I have added this to the nuxt.config.ts file like this: ```js...

Where to put shared types in nuxt applications?

I have some types/interfaces I need across the application in 7/8 components. At first I put them in composables, but I don't really like having type files in composables, doesn't seem a good fit. What's the alternative?

Typescript autocompletion in ".vue" files "broken"

TL;DR TS import autocompletion works in ".ts" files, but no longer works in ".vue" files Note: Had been saving the application locally, but didn't have a git commit that I could roll back to (in case it's code/config related) ...

From a pinia store: $fetch() doesn't send headers serverside, and useFetch causes hydration errors.

I have a pinia store that fetches from a server api endpoint. That endpoint reads an HTTP only cookie (a jwt) for authentication. On page load if I use $fetch in the store, the cookie isn't passed to the endpoint, making the request unauthenticated, which AFAICT is intended behavior. If I use useFetch, there are hydration errors on the page. The page works fine if I fetch from the store via onMounted() or navigate to the page, but hitting refresh on the pages causes one of those two errors. Using onMounted I don't get server side rendering, which is probably fine for this paged....

Access a .vue component props inside a module.ts file

Hi, I’d like to access the props of every components in my nuxt app from my module.ts file to generate custom data that will be given to a parser. How can I achieve that?...

Dynamic Routing in Nuxt 3, Ionic and Sanity

Hey everyone. I'm running into an issue with dynamic routing in a Nuxt 3, Ionic and Sanity project. I have a live test project in production: Repo: https://github.com/edwardz8/nuxt3-test Live Test Site: https://nuxt3-ionic-sanity.vercel.app/...

NuxtUI props with i18n

How do I use tm or rt in items prop in Nuxt Ui?

Sudden uptick of 503 errors on Cloudflare pages for exceeded cpu time

For the last 24hrs, I've been getting 503 errors on my Nuxt app deployed to cloudflare pages. The app is a very small blog app with only 2 articles. I'm on the free tier and my worker usages are nowhere near the free tier limits. The last update that I made to my app was in September of this year, so I haven't changed anything and it's been working fine since then. Any suggestions on where to look? There's no suspicious traffic that I can tell. I have a WAF rule for US-only traffic and banning a...

How to stop nuxt generate to crawl links

Nuxt generate will look for all <a> tags and follow their href to generate them. How to stop this?

Default layout in error page

Can I use the default layout when creating an error page? It's not working with either NuxtLayout nor with definePageMega.

Prerendering custom routes does not work as intented..

My directory is like follows: ``` . ├── app │   ├── pages...
No description

Using Deno Deploy with Drizzle and MySQL2

Hi! I was trying to deploy a nuxt project to deno deploy today. It uses mysql2 and drizzle for the database stuff. However, after deploying it, I got this error:
[nuxt] [request error] [unhandled] [500] [unenv] net.connect is not implemented yet!
[nuxt] [request error] [unhandled] [500] [unenv] net.connect is not implemented yet!
...

Setting up NuxtImg with an external cdn using ipx

Hello, I want to use Nuxt Image to serve images from an external cdn locally (from within the public folder), but I can't get the configuration right. Could anyone provide me with an example configuration for this?...

Is it possible to have nested layouts within one page?

Something like this but not have the page or layout keep refreshing when switching between layouts. ```<script lang="ts"> import type { User } from './assets/interface/user'; import { useStore } from './stores/stores'; ...

Nuxt UIHow to override component defaults

Hello, I am trying to override a component's styling but I am kind of failing to do so. This is my app.config.ts I made everything red so that it's easy to notice if it actually changes anything but it doesn't. Am I configuring something wrong? Also I tried to apply the classes on the component itself with [&_.inactive]:text-red-800 but that also didn't work. How can I do this? Thank you. ```ts export default defineAppConfig({...

Child page/component replace parent page/component?

I have a child page of let's say parent/. The parent page has a layout as well that adds a sidebar for matching routes. So I have /playground.vue...

Intellisense error when try to import package

I am trying to import the path library for my config, but after importing I get a long load of Intellisense in VS Code and subsequently import errors. How can this be fixed? npm install --save-dev @types/node does not help...
No description

Can I have SSG and SSR in the same project??

I have 2 projects to work on in a monorepo: the landing page & a website with auth and other stuff. The main website is a simple SSR application but I wish to statically generate the landing page. The problem is that they both have the same public/ folder (for fonts) and server/ folder because of the text on the landing depends on API call to my server.
Next