Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Nuxt Layers: using template vs default application

When creating a new layer, what would be the major differences (pros and cons) between using a layer template (nuxi@latest init -t layer mylayer) and directly initializing a full Nuxt app and using it as layer ? Both approaches seem to be working.

Nuxt layers and deployment on Vercel/Netlify fails because of missing `tsconfig.json`

Hello all, I'm currently learning to use layers, and it's all great, but I have an issue when trying to deploy on Vercel or Netlify. Basically, I have a bun monorepo with a Nuxt app extending a Nuxt "base" layer. The app was created with 'bunx nuxi@latest init myapp' and the layer was created with 'bunx nuxi@latest init -y layer base'. When trying to deploy the app, I get this error: "[vite:vue] failed to resolve "extends":"./.playground/.nuxt/tsconfig.json" in /opt/build/repo/packages/base/tsconfig.json"...

How to auto import file libs and using it on the page

So I have a something like file libs that I want to use on my page and I want to make it auto import so I don't have to import everytime I want to use it.

How to change the title of page dynamically

Something like this. ``` <template> <div class="container">...

How to change the root of route in NUXTJS3

For example, the current route will be redirected to '/' and I want to redirect to something like '/auth/login' while accessing the root of route.

ERROR [worker reload] [worker init] /.nuxt/dev/index - How do I identify the cause? - FIXED

How do I figure out what's causing that issue? I can't load into the website, I'm getting a 503 (Service Unavailable) error, launching with --inspect isn't helping either as nothing is being logged there

cookies not send to external api

Hello, does anyone know why my req.cookies is empty when my cookie is sent to my REST api? back-end : ```ts...
No description

Error pages

Am I doing this right? It used to be that we had error.vue in layouts but now were on nuxt 3, ive made error.vue in the top level, and then ive got
<template>
<NuxtLayout />
<p>{{ error.statusCode }} </p>
// etc
<template>
<NuxtLayout />
<p>{{ error.statusCode }} </p>
// etc
in that file, so it uses the default layout - but only the layout renders....

NuxtHub blob prefix not creating a new path

When I set a prefix for an image upload like this: ```ts await hubBlob().handleUpload(event, { multiple: false, ensure: {...

How to define external packages in build

Postgres is used for local db during dev, and neon on cloudflare. The cloudflare preset build will fail if I try import postgres, so how do I mark it as an external dependancy in my nuxt/nitro/vite/rollup build so it isn't bundled? I'm already using an inline import statement to support this at runtime.

How do I redirect my index file and have prerendering find all my content?

I want to redirect root / to /guide/getting-started, but when I do that, none of my prerendered pages are picked up.

Global middleware only runs once on client side ?

Hello there, Hope you all doing well. am trying to force a user on a password reset page based on their login token. the password reset flag is working fine. But my issues are : ...

How do I add a custom log reporter to nuxt?

I have tried using a module to call the addReporter function on the logger instance like so: ``` import { useLogger } from "nuxt/kit"; // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({...

How to polyfill buffer when using web3 Solana connector

Hi, I am facing a build issue when I try to build for cloudflare_pages ``` ERROR Cannot resolve "unenv/runtime/node/buffer/index/" from "~/Projects/playground/nuxt-walletconnect/node_modules/.pnpm/@[email protected]/node_modules/@keystonehq/bc-ur-registry/dist/index.js" and externals are not allowed!...

Error handling inside server routes located inside /server/routes

I'm trying to have it so when my server route fails it redirects to the full screen error page. I'm trying to do this by using the createError function inside the event handler. This isn't redirecting me to the fullscreen error page but instead it goes to the failing route on the client. So for example if my server route: /login/microsoft/callback fails it shows met the /login/microsoft/callback path inside the browser and will throw the vue router warning "No match found for location with path...

Disabling AutoImport for Layers Only

Hello, I have a nested folder structure for layers for organization purposes. Something along the lines of `/layers/group1/layer1...

useAsyncData(..., { server: false }) in combination with .client.vue not working correctly

I have a couple pages that I don't want Nuxt to render server-side, but I do want navigations to be blocking when navigating to one of these pages. Here's an example page: ``` <script setup lang="ts"> const { data } = await useAsyncData( async () => {...

Error deploying to fly.io

Deploying a nuxt app in fly.io is usually very easy. The fly cli handles everything for you. However, its the first time im using layers in a project and the usual process and configuration doesnt work. Got: ```console => ERROR [build 5/6] RUN bun --bun run build 2.1s...

vueDemi2.effectScope is not a function

I get this error vueDemi2.effectScope is not a function this is my package.json i have no idea how to debug this...
No description

Dynamic v-model with component :is

Hello i have this use case in my mind. Let's assume i have a list of components like this ( For context this is a modal with customer info reviews, product bought etc) ```js...