Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Page routing with multiple domain

How can I use multiple (sub)domains within a single Nuxt project (e.g. pages/<domain>/about.vue)? I know nuxt/i18n somehow does it but I was unable to figure out how exactly it does it.

devProxy with path both for regular requests and websockets

I am building a GraphQL application where the API endpoint is on /query. I want the devProxy to proxy regular requests AND websocket requests to the same endpoint. However, I can't figure out how to do this properly.
The below obviously doesn't work as is, duplicate key and such: ```json...

getting Nuxt context into a nitro route

Hey guys, I'm trying to create an adapter for our auth provider, logto, and it's proving to be a bit more difficult than I expected. Originally I was accessing our logto context via nuxtApp.ssrContext?.event.context.logtoClient unfortunately this doesn't work client sided, as you might expect, so I decided to create a nitro route for client requests to go through. ```typescript...

Nuxt Supabase and remembering session

I have successfully setup Nuxt + Supabse module. After doing a refresh in my browser it forces me back to the login page. I am wondering if there is a way to make this persistent until the browser closes. I haven't been able to find any documentation on this.

500 - Cannot read properties of null (reading 'ce')

I'm coding a Billing Interface for my project, and I'm no idea how im getting this error, and how to fix it. 500 Cannot read properties of null (reading 'ce') at renderSlot (https://178-236-243-96.ibgp.us/_nuxt/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js?v=30de441f:2983:32)...

How to deal with authentication

Hello all, Starting my journey using vue/nuxt. I've used to play with laravel and django for the last one year. Someone could help/point me out to a comprehensible tutorial for beginner about Nuxt 3 and how do I handle authentification. Being honest, i've googled since a while but didn't find a beginner friendly tutorial....

Nuxt 3 + Stripe API: Handle requests after payment is success

I'm using a Stripe webhook to listen for events after a successful purchase (checkout). After the purchase is complete, I need to trigger a POST request. Here’s how the flow works: On the front-end, I have a form that collects the necessary data (which will be sent via the POST request)....
Webhook responsible for processing the payment and create the website (POST request)

Global import of css files, but no.

Hello, I have a problem with the css files I import with <style scoped> @import.... </style>...

Pinia Persistedstate with Composition API

I am trying to persist my pinia store state in my composition API store. I am not able to persist my state in the local storage with the composition API approach. When I use the old Options API for my store I am able to store my state inside the local storage. Has anyone else the same problem? Packages: @pinia/nuxt @pinia-plugin-persistedstate/nuxt...
No description

Nuxt turnstile module server side verification in cloudflare pages

Hello, I'm having some trouble with turnstile module. I have this working well in local development, but when I transfer the code to cloudlfare pages the "verifyTurnstileToken" does not seem to work. The ENV is clearly ok, cause I get from the front end the token and it is verified in both environments. So the there's something different going on in the server side on cloudflare pages....

Accessibility ES Lint plugin with Nuxt3

```js // @ts-check import pluginVueA11y from "eslint-plugin-vuejs-accessibility"; import withNuxt from "./.nuxt/eslint.config.mjs"; ...

How to use ReadableStream response with $fetch?

I have an API route whose response will be a ReadableStream. However, with sendStream the inferred type is unknown and when returning the stream the type is simply { readable: bool }. Is there a better way how to express this which works with $fetch?

Bizzare error with whole screen split in two

For some reason and out of nowhere, the app now renders twice. Yes, in one path all the components are rendered twice.

Using JWT in middleware

can't use jwt in middleware, throws an wierd error
No description

Testing with i18n and vitest

Hey. I have a simple component that uses $t for translations. I'm trying to write a simple test, but it's failing. ```ts describe('UserSignInForm', () => { it('renders', async () => { const component = await mountSuspended(UserSignInForm);...

Do Nuxt server plugins (example.server.ts) execute on every request for a SWR cached route?

Hello, during development and in my local production build I can see that the Nuxt server plugin I've created is executing on every request I make (even if the route is cached), however in my Vercel deployment it does not. This results in sensitive data being leaked across requests. It would be great to know if this is correct behaviour or if I've missed something. Any help would be greatly appreciated!...

Can you define a page completely separately from the rest (no plugins, no middlewares etc)?

It is an emendable iframe that is defined as public page on my nuxt app. It doesn't need all the plugins, like auth, middlewares and so on. To speed the loading time there.

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.