Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Is it possible to inject (typed) variables on a component by component basis?

I have a form builder use case where a form is comprised of hundreds of steps. each step works on a slice of the form data, so each step should have a typed interface to interact with the bit of state it manages. i could achieve this by calling useStepFormData<"Step1"> etc in every step component, but I am wondering if I can automate this using a nuxt plugin where the plugin effectively writes the above line at the top of the setup script?

Nuxt 3 API Endpoint Data Lost During Server-Client Transfer Despite Valid Server-Side Data

I'm experiencing a puzzling issue with my Nuxt 3 application where data is being lost during the transfer from server to client, despite the data being valid on the server side. Setup I have a view model that handles data transformation: ```typescript...

Component is already mounted, please use $fetch instead

Hello, I'm struggling with the following error message: ```...

Nuxt UI - Unexpected token ';'

Hello, my problem is very simple. I follow the docs of nuxt UI and type in:
npx nuxi init -t github:nuxt-ui-pro/saas...

Restarted dev server, 503 error: ENOENT: no such file or directory worker-56658-1.sock

I decided to restart my dev server, and now it's returning 503 errors of all of a sudden. I get this showing up as the page title when I try access localhost:3000 ``` Error: ENOENT: no such file or directory, access '/var/folders/xs/gw92558x5yb25m5g93rf0dc80000gn/T/nitro/worker-56658-1.sock' | Nuxt...

How to force a reload for all users?

Following scenario: The admin in my app can edit text snippets which are also cached in my app. When the admin edits the text snippets it also clears the cache. When the user reloads the page with CMD + R, the cache is being cleared and the updated text snippets are shown. However, if the user navigates through the app this wont clear the cache/show the updated text snippets. I often see notifcations in apps like "There is a new version available. Click here to update the app" which bascially just reloads the app. ...

Module pinia is disabled due to incompatibility issues: - [nuxt] Nuxt version ^2.0.0 || >=3.13.0 is

import { useUserStore } from '~/stores/user'; export default { setup() { const userStore = useUserStore(pinia);...

Unexpected token ';' when refreshing every page

I don't know what's causing this and it's driving me insane. I keep getting an error "Unexpected token ';' and then the attached trace. I can't figure out why. Some refreshing of files may fix it sometimes or if I navigate back home then go back to where I was, that can fix it too. But why is this happening?

JWT generation

Hello. I create an e-commerce project. I want to use JWT (access & refresh) for everybody (guests & users). Also I want to use /server/api. I create plugins/api.ts for custom fetch. I guess to create /server/api/token/get & /server/api/token/refresh/ for working with tokens. My questions: 1. Where do I need first request to token/get for getting the token pair? 2. When the page loads I need to check "Does the cookie refreshToken exist?" If YES I need to fetch /token/refresh/. Where do I need to do it?...

Why can't VS Code read this json file?

Hello, I'm brand new to web dev and am setting up my first nuxt project. I can't figure out what is wrong with this project. Why can't VS code read the tsconfig.json file from my hard drive? I have tried reinstalling everything and consulted with Chat GPT but I can't figure it out. Surely it is something very silly. Thanks in advance....
No description

Cannot read properties of undefined (reading 'isKeyObject')

After integrating the @sidebase/nuxt-auth (next-auth) api handler at server/api/auth/[...].ts, I'm getting the following error during netlify build: ``` TypeError: Cannot read properties of undefined (reading 'isKeyObject') at file:///opt/build/repo/.netlify/edge-functions/server/server.js:1:248573...

SyntaxError: Unexpected token ';'

Hello, I have came across this sudden error, which has appeared out of nowhere. Tried going back in code and the problem seems to be in me using the USelectMenu component . Any help is welcomed 😄
No description

Prevent Full Page Reload & Stop sidebar from scrolling to top

I am having an issue with my documentation. You can see more about the issue here: https://github.com/BayBreezy/ui-thing/issues/52 When I click a link from the navigation on the left, a full page reload is triggered. How do i prevent this? The reload causes the navigation to scroll back to the top of the page. You can visit this website to see what I am talking about : https://ui-thing.behonbaker.com/getting-started/introduction...

500 error code just after upgrading to 3.15v

I am getting the following 500 error code just after upgrading to 3.15v `500 Unexpected token ';' ...

How to not have nested layout/pages refresh when the main layout changes

I have the following code: ``` <NuxtLayout :name="mobile ? 'mobile' : 'default'" <NuxtPage/> </NuxtLayout>...

[UTable] How to disable clientside sorting when using serverside driven data

Hello All! I've got a UTable that uses reactive Ref<RowType> for it's rows.. so it ends up requerying when there are changes to sort. It's working in that it triggers the query to serverside with the proper sort updates, but it sorts twice.. first it sorts on the client with the data from the current page.. and then it comes back with results from the server which are properly sorted (across pages not just clientside current page)....

NuxtImg, custom query parameter on source

Hello, I allow my user to customize their logo on their page. However, since I always register it under the name "logo", the NuxtImg cache doesn't refresh and doesn't show the new logo...

Testing $fetch

My api.ts utils: ```typescript export const apiBack = async <T>( url: string, token: string,...

Wrapper to a component with same props, emits and other attributes

Hi everyone, I have been using formkit from over a year now. But the thing I struggle with most is consistent styling. I'm using tailwindcss and working in an on-going project so can't use themes I might have to do alot of overwrites. One solution I come up with is to create wrapper components, the hurdle to this approach is props passing and listening to emits. Can anyone guide me how can I create wrapper components. Thank you...