Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

How can I avoid 401 error with useFetch and http basic auth, when SWR enabled

Hello, I have the newest Nuxt (v3.14.159) and nuxt-security (v2.0.0) packages . When I call useFetch to a server route, in a page, where SWR is enabled, I get a 401 because of the http basic auth. When I manually include the headers in the request it works, but what is the Nuxt/nuxt-security intended way to do this? Thank you and kind regards...

USelect option values always turn into strings

I'm using a <USelect> with the following options: ```ts const businessTypes = [{ name: 'Particulier',...

Add custom config in nuxt ui button

I would like to add a personal config to the already existing one of the nuxt ui buttons

shared dir in Nuxt 4

Where should i put my shared folder that got implemented in Nuxt 3.14 in Nuxt 4. I get errors in the server that it cant find it.

Import layer with supabase module

Hello, so i have a layer that takes care of the auth in the application Im using supabase module for all the auth and it works well on the layer However, when i try to expand the origin app i got this error on the console ```javascript...

How to make software as a service in NuxtJS3?

How to make software as a service with NuxtJS3? What's the structure looks like if we want to make it?

How to modify core browser functionality?

Hey everyone, I need to disable the browser's print() method in my Nuxt app. Anyone know how to do this? Thanks!...

Module authoring with tsup

When authoring a Nuxt module, it is recommended to use this template which uses @nuxt/module-builder under the hood. What if you don't want to use it, and you're using something like bunchee or tsup, is it still possible? I attached a code example, and just want clarification if it's safe to use. You would normally import it via #imports if using @nuxt/module-builder, but this time since Im using a different bundler, is it safe? Also, can we skip CJS build today when authoring a module if your package dont rely on any commonjs package?...
No description

How to use svg

Hey, i'd like to know how i can use svg inside nuxt (i don't use vite) :

Hello guys, how are you? i have one question here, i am very pleased if anybody help me.

Hello guys, how are you? i have one question here, i am very pleased if anybody help me. can i use nutx/apollo on my server api file. like signup.post.ts file? if i can, do you mind if you show me some documentation or example, if not, what are other alternatives rather than fetch?

i18n and route rules

I'm using the latest version of Nuxt + @nuxtjs/i18n configured with strategy: 'prefix_except_default' and recently noticed something odd - my route rules aren't being applied to prefixed paths. For example, routeRules: { '/foobar': { ssr: false } } only applies to /foobar, not the prefixed /fr/foobar path. It's relatively easy to work around by adding unique route rules for every language, for every path, but it does quickly multiply the number of route rules which is annoying. I was just wondering - does anyone happen to know if this has always worked this way, or if it may be a newish bug? I've been running Nuxt + i18n in production with a half dozen languages for at least a year, but this is the first time I noticed the route rules only applying to the default language's (non-prefixed) path....

NuxtImage: Environment-specific IPX alias

We're using NuxtImage with the default provider (ipx) and an alias to proxy externally hosted images. We have several runtime environments, and would like this alias to resolve to different URLs depending on the environment. This is harder than it seems. We can't use environment variables due to the way Nuxt 3 works, and the module does not use runtimeConfig variables. I've tried creating custom resolvers that extend ipx, but ipx is only loaded as a server route if ipx is the provider. Any ideas...

Hello friends

I am beginner with nuxt.js , I am trying to install pinia , after i installed pinia it gives me this error : [vite-node] [ERR_LOAD_URL] pinia...

UForm doesn't accept type import for schema

I have an exported const in a different file that has my zod schema. when I try to specify the schema in :schema in my UForm, I get this:
vue: Property formSchema does not exist on type
CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { state: { title: string; description: string; objectives: string; }; onSubmit: (event: FormSubmitEvent<{ title: string; description: string; objectives: string; }>) => Promise<...>; }, ... 23 more ..., {}>
vue: Property formSchema does not exist on type
CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, { state: { title: string; description: string; objectives: string; }; onSubmit: (event: FormSubmitEvent<{ title: string; description: string; objectives: string; }>) => Promise<...>; }, ... 23 more ..., {}>
even though it works fine in other places...

By default, page navigation in Nuxt.js 3 scrolls to the top.

Hi Devs, I'm facing an issue in Nuxt.js. When I scroll to the bottom of a page and navigate to another page, the scroll position resets to the top. I want the page to always start from the top, no matter where I scrolled. How can I prevent this default scroll behavior? i have tried many time but not get proper solution....
Solution:
i have fixed it - import type { RouterConfig } from "@nuxt/schema"; export default <RouterConfig>{ scrollBehavior(to, from, savedPosition) { if (savedPosition) {...

The best practice for using typescript on NuxtJS3

How to make types for the response data that we get by using typescript on NuxtJS3.

Reusable methods that can be use in any pages

How to make reusable methods and that can be used in any pages. Please make it for the most best practice of it.

How to make state management in NuxtJS3

Hello everyone, can anyone help me out about how we can make state management by using pinia in the best way or practice?

(Solved) Nuxt with SASS - Legacy Deprecation

Hi. I am runnning into an issue while trying to use sass with Nuxt 3 project. I'm more of a do it yourself type of guy and therefore would like to use SASS. The sass package I use though, is throwing deprecation errors: ```...