Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

data not persisting between updating store value and a navigateTo redirect

I'm working on my first nuxt app and am running into an issue with pinia updating properly before I use navigateTo for a redirect. Use case: I have my app receiving a callback as part of the auth flow from WorkOS (My app has SSR enabled and persisted state is using cookies). Once a user authenticates with their google account (or email/password) via WorkOS, it sends the auth code to my app /callback?code={some-auth-code}...

Scroll jump when navigating between pages

Hello, since version 3.10.2 there is a bug in the navigation between pages that makes the content flicker, jump from one place to another and under my point of view, it is quite annoying. Because of this problem, I haven't updated the nuxt version for about 8 months now and need to do so because of other fixes, security patches etc. The bug is so annoying, that I can't leave it like this in production. I have compiled a list of others who are experiencing the same problem so you get all the context we all provided....

Could not compile template nuxt-icon-client-bundle.mjs

Hello , I use Nuxt with @nuxt/ui which includes the module @nuxt/icons. Here is my nuxt.config.ts file ```ts import { createResolver } from '@nuxt/kit'; const { resolve } = createResolver(import.meta.url); ...
No description

Disabling alias "absolute path" import warning

Is it possible?
warning: rewrote @shared/ui/theme/tailwind.css to ../shared/ui/theme/tailwind.css but was not an abolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path.
warning: rewrote @shared/ui/theme/tailwind.css to ../shared/ui/theme/tailwind.css but was not an abolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path.
...

Question regarding structure of module

Hello, this is more of a theoretical question, for context i have an app used by different customers. The first plan in my mind is to have a repo of modules which willl have the custom functionality of each customer ( maybe customer X wants Y feature, and customer A wants B feature) in this module on the before build hook get the customer name ( example pepsi) And download the appropriate module from the repo and install it (I'm 80% positive that this is possible if it's not please let me know) ...
No description

Runtime addons?

Hey, I'm working on creating a system for adding on to your app at runtime using jiti, giget, and unbuild. I've got a fair amount of it working but I'm running into issues dynamically importing pages/components. It would be nice if there were some best practices about enabling something like this. The goal is something as easy to use as the wordpress plugin system that made it so popular but using nuxt under the hood. I've posted a link here with some description of how things are laid out and where the issue is it should be fairly easy to reproduce: https://github.com/nuxt/nuxt/discussions/29615...

vscode complains about auto imports

there is a utils/index.ts in my project, i know it would be auto imported into my vue components and it works fine, but the vscode would complain about it like this:
Property 'toLocal' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{ course: CourseExt; }, {}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 18 more ..., {}>'.
Property 'toLocal' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{ course: CourseExt; }, {}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 18 more ..., {}>'.
where toLocal is the helper function in the utils/index.ts file, how can i fix this?...

Nuxt Warning: Schema and Kit Version Incompatibility

Has anyone experienced a similar warning? It happens right after running scripts like 'npm install' and 'npm dev'. When I delete all the 'nuxt' folders using Everything and then reinstall with 'npm install nuxt', the warning disappears, but after some time (2/3 days), it comes back. I ignored it thinking it was just a matter of time, but it's been months and this warning still hasn’t gone away (I searched online but couldn't find a solution).
No description

Cant access pinia from component

I am trying to access my store from component but i am getting that error
[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. This will fail in production.
[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"? See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help. This will fail in production.
...

module : Using store in component

Hello, I'm building a module and I have a component that loads data from the pinia store. I use the suggested syntax : const store = useStore(). Everything is working great on the dev playground app, but when I use my module with a new app, importing my component I have this error : 500 : useStore is not defined and the stack trace refer to my component...

Private github module

Maybe I'm just being stupid but: We have 2 Nuxt projects that partly use the same components. That's why I wanted to outsource them to a module. As this is only internal, I obtained this directly from git via NPM. However, in node_modules there is only the package.json and the readme. what am I doing wrong?...

Adsense in Nuxt

Hello, is it correct nuxt.config.ts? ``` scripts: { globals: { adSense : { src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-39842247889089901'...

FIXED: nuxt-auth-utils google oauth working on localhost, not on domain

Getting this 400 error. I have completed relevant setup in google, added callback uri, correct secret etc.
No description

Unable to preload CSS errors

Hi, I am on Nuxt 3.13.2 and in my Sentry I get a lot of errors for "unable to preload css". For example: "Unable to preload CSS for https://kingofkonafa.nl/_nuxt/storefront-qrorder.CdTTPRhT.css"...
No description

usecookie() problem

Hi, I have a problem with usecookie. I am trying to keep the darkmode value even after closing the page. The problem is that in "npm run dev" environment it works, but after generating it with "npx nuxi generate" and uploading it to a static webhost it doesn't. I believe the problem may be in the bind of the 'dark' class to the darkMode value. If I remove this and only display the darkmode value using {{ darkMode }} it works on static hosting. Please help. ```<template>...

How to password protect a site?

I want to quickly share a project I made with a client. But I want to password protect it so that it cannot be accessed by anyone else. The site would be up for a very short time so I don't want to mess with Authentication and stuff. I am searching for a very simple solution. Thanks in advance....

Nuxt Map module abandoned?

Hi, has the Nuxt map module been abandoned? It is no longer available in the NPM registry and the website has a certificate error. Issues are seemingly going unanswered: - https://github.com/Baroshem/map/issues/7 - https://github.com/Baroshem/map/issues/8...

Prime vue and nuxt strange event style

Why does this keep happening, he loses all style when changing pages?

JWT Example Project

Hello. I develop an online store with Nuxt. I used a third part Backend API before. Now I want to use /server/api for it. And inside /server/API/, requests are sending to the necessary services and the database. I plan to sign all requests with the JWT token and I will keep it in the cookie. ...

Content does not load in production

Hello. I have started building a basic blog using @nuxt/content with markdown. Content files are inside content/blog folder. The blog index Vue file is inside pages/blog/index.vue. Here's the way I query the content: ```js...
Next