Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Nuxt 3 + AWS Lambda@Edge + AWS S3 + IPX + Nuxt/Image Not Working (404)

I need some help understanding something. Based on my reading, I cannot use nuxt/image with AWS S3 without some other CDN or service to render my images? In other words, IPX is not supported on AWS? There seems to be a lot of confusing documentation surrounding Nuxt and this is one of the big areas where the documentation seems to be lacking and is confusing. My website is SSR, deploying to AWS Lambda@Edge with AWS CloudFront. I upload the static assets from .output/public to an AWS S3 bucke...

Failed to exchange the Google token

Hello everyone, has anyone here ever encountered the error that the code from Google OAuth is not valid when I try to exchange it for a token from the backend? I followed this article to implement a login flow with Google using nuxt-utils, but when the code is sent to the backend, it becomes invalid, resulting in the error: failed to exchange Google token https://medium.com/@tony.infisical/guide-to-using-oauth-2-0-to-access-google-apis-dead94d6866d This is my code to handle login google oauth....

How to ensure nuxt doesn't run out of memory?

I have a blog with a lot of pages running with SWR (I don't want it to be static) but eventually the deployment runs out of memory, is there a way I can make sure it only stores 200 pages max in memory?

Way to pass data between route middleware and page

I am trying to make a authentication middleware and because I am looking for something very specific I cannot resort to already made tools. The basic gist of it, like many auth middlewares, is to route to a 'login' page if the user has no permission and route to the right page if the user does have permission. I managed to get this far, but the issue now comes when I want to add content to this page that also varies depending on the user (some users have permission to see certain things). My thought was that I could pass this 'session' to the page from the middleware. I have tried things like setting context, meta and also useState. None of them seem to work. It is required that the user MUST NOT get to edit and SHOULD NOT see the data that is passed from the middleware to the page...

Is there a way to force clear cache while in production?

I use SWR and cache some routes, I wanted to make an extra route such as /api/clear that will clear all cached swr data (so everything it fresh data again)

Nitropack Internals in Nuxt

Hello, I'm trying to use some of the utilities from nitropack in Nuxt. For example definedCachedFunction. I only see the export from #imports in the virtual file system but not in the generated typescript file. Are they supposed not to be used in nuxt event handlers? I see that I can import them from nitropack/runtime/Internals/cache. Is it a bad idea to use it?...

How config the HighChart with nuxt ui-Theme?

I’m working with Highcharts and Nuxt UI. How can I apply the Nuxt UI style through the plugins/highcharts.client.js file? Is it possible to use the color mode here—especially for switching between dark and white (light) themes? Below is my current highcharts.client.js: `import Highcharts from 'highcharts'; import HighchartsVue from 'highcharts-vue'; ...

How to import component from inside the directory in NuxtJS 3?

How to import component from inside the directory in NuxtJS 3? so for example, I have a component SplashScreen on folder components/partials.

How to make splash screen effect in NuxtJS 3?

Hello everyone, Is NuxtJS 3 support to make splash screen effect like mobile app? so I want the splash screen to only appear once when the app is initialized for the first time.

Using `@nuxtjs/strapi` with Strapi v5

I'm encountering some issues with autoimport with version 2.0.0 of @nuxtjs/strapi module. Specifically, it seems that the correct version of useStrapi composable is not being correctly imported. I end up with the composable being either unavailable or available but with an incorrect v4 version instead of the v5, depending on whether I specify v5 as the desired version in the config. Manually importing the composable does not work either, as it is not included in the modules import.d.ts file in the module's folder within node_modules. ...

Minify JS build code

I am building my nuxt app but the js is not minified, exposing the contents of all API route handlers. Is there a way to minify this?

We don't have an Official Docker Image for NuxtJS?

I was searching in Docker hub but I see that there is no official image of NuxtJS, is this like that or have I searched wrong, can you please help me, thank you very much!

How to Right-Align Cell Content in a UTable?

I want to right-align the content of specific cells in a UTable. When I add class: "text-right" to a column definition, it only aligns the column header but not the cell content. For example: `const columns = [ { key: "kostartebene1", label: "Kostart", sortable: true, direction: "asc" }, { key: "1", label: "Jan", class: "text-right" },...

Reducing Redundant API Handlers While Preserving TypeScript Types

I have multiple handlers that are nearly identical except for the types they use and the endpoint paths. Here's a simplified example: ```ts // types.ts export interface RequestTypeA { /* fields / } export interface ResponseTypeA { / fields */ }...

Custom scripts in command line?

Is it possible to create a custom script that I can run with "npm run"? It seems I can't access defineNuxtConfig during this approach with a normal TS file and TSX. ReferenceError: defineNuxtConfig is not defined I want a custom script I can run in the terminal that extends "npm run generate" so I can pass some arguments....

Nuxt UI Pro defaults

Hey! When using Nuxt UI Pro with nuxt font+tailwin, If i want to specify what font is used for say a h3 in the components, is there a way to do this globally?...

Problem store on middleware

How to fix this issue in middleware?
[nitro] [unhandledRejection] [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables.
[nitro] [unhandledRejection] [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug. Find out more at https://nuxt.com/docs/guide/concepts/auto-imports#vue-and-nuxt-composables.
...

Middleware cant access useCookie on server

Good day everyone, i am trying to use useCookie to store my passport access token then i added middleware to check if the token exist go a head and identify the user if not redirect him to register in it on local windows enviroment every thing work great but when i deployed on the server it always redirect me to register page even my token exist here is my code snipt ``` import { useCookie } from "nuxt/app"; import { useAuthenticationStore } from "../stores/Authentication/authentication"; ...

Nuxt restart always after any change on any folder & files

After each update on a components, my nuxt server restart with log : Directory components/ui/ removed 00:14:44 ℹ Restarting Nuxt... ...

[nitro] Dynamic require of "crypto" is not supported

I'm trying to import a package in api route. ``` import { CodeSandbox } from '@codesandbox/sdk' ...
Next