Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Use SASS function globally

I am currently building a module and I want to use a function that I can use globally in any compoent of my Nuxt Module. In my module.ts I currently have this: ```ts const runtimeDir = resolve('./runtime')...

bun x nuxi@latest init <project-name>

Bun could not find a package.json file to install from
No description

Updating props before binded

In this project, form controls have permissions that are received from call to an API endpoint. I have somewhat gotten this concept right, however, the permission only seems to be applied on a re-render. A "screen-key" is sent to the backend, the backend returns with an array of screen-keys (for form controls) and applies related permissions (AKA availability). Eg. disable, readonly, hidden, etc....

Updated tailiwind in my project to v4 getting error

i updated my tailwind project to v4 but getting a error about keep using postcss but in the instalation it tells me to install the vite version in the nuxt project idk. what todo now or how to fix this
No description

classes on div disappear seemingly at random

I have these three flex divs, and at random refreshes some of them will just have text-center instead of the classes defined ```html <div class="flex justify-between text-md/0"> <div class="font-bold">TOTAL</div>...

Unresolvable type reference or unsupported built-in utility type

My types in components are not recognized. When I use any type that is declared in ./types/*.d.ts in a component directory .vue file it just shows my an error "Unresolvable type reference or unsupported built-in utility type", but it works when I use same types in composables directory. Any idea why and/or how to fix it? ./types/user.d.ts ```typescript type User = {...

Buiding app with @originjs/vite-plugin-federation

I have a Nuxt 3 micro app that I am trying to build using the nuxt config below. When I add the shared inside vite and do 'npm run build', I get the error: ERROR Nuxt Build Error: [vite]: Rollup failed to resolve import "federation_fn_satisfy" from "virtual:federation_fn_import". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to...

[i18n] Is translating the complete URL possible?

I try to integrate multi language with @nuxxtjs/i18n v8. Lots of things work, but URLs, while prefixed with the language code, won't get translated. What is /about in English, becomes /de/about in German (instead of /de/ueber-uns ) and /fr/about (instead of /fr/a-propos). Here is a reproduction: https://stackblitz.com/edit/multi-language-test-app?file=README.md Am I wrong in assuming that the complete URL has to be translated? If not, what is wrong with my setup?...

Exceeded CPU on Cloudflare Pages

So I have this tutorial app on Cloudflare Pages, with a few (like 10) markdown files in /content directory. When you go to a content page, e.g. myapp.pages.dev/about-us, it will first render Not found (data is also empty from console.log). Then after reloaded the page, it will render data content....

Properly abort rendering a page and redirect to another

Hello, I use Nuxt 3 and Pinia store. I have this case in which a page may either be rendered or redirect to another page depending on a condition. Here's an example: ```typescript...

Nuxt layers relative path

I have 2 nuxt projects, project 1 and project 2. Project 1 uses the
extends:['../project2'],
extends:['../project2'],
to utilize this project as a layer. Inside the server folder of project2 I have a folder for database models that get used in the api. This all works perfectly fine when i'm running project2 as a dev server, but when starting up project1 it can't load these models. ...

Nuxt, Supabase, Pinia + target="_blank" link = missing data in components

I'm very new to this FE stack, but I've had a problem for days now. I just can't seem to fix it. In a component I have a link like this: <a href="some-other-site" target="_blank">Some xternal site</a>. When I click on the link and then go back to my site's tab, and click on an internal link, some components has stopped working. This is only the case with links that opens a new tab, if I leave _blank out, it's no problem to hit the back button in the browser, it all renders fine. When I get back to my tab I see this in my console: Auth state changed: SIGNED_IN That comes from my useAuthStore.js: ...

Nuxt Error cannot Start Cannot Find Package:plugin-transform-typescript

hey guys i have a very simple minimal project with nuxt/ui and i am getting this error when trying to start it what is the problem:
[nuxi 6:23:40 ከሰዓት] ERROR Cannot start nuxt: Cannot find package 'C:\Users\admin\Desktop\Full Typescript Projects\cognito 1.0\COSMO\node_modules\.pnpm\[email protected][email protected]_@[email protected][email protected][email protected][email protected][email protected]_\node_modules\@babel\plugin-transform-typescript\lib\index.js' imported from C:\Users\admin\Desktop\Full Typescript Projects\cognito 1.0\COSMO\node_modules\.pnpm\[email protected][email protected]_@[email protected][email protected][email protected][email protected][email protected]_\node_modules\vite-plugin-vue-inspector\dist\index.mjs
Did you mean to import "@babel/plugin-transform-typescript/lib/index.js"?
[nuxi 6:23:40 ከሰዓት] ERROR Cannot start nuxt: Cannot find package 'C:\Users\admin\Desktop\Full Typescript Projects\cognito 1.0\COSMO\node_modules\.pnpm\[email protected][email protected]_@[email protected][email protected][email protected][email protected][email protected]_\node_modules\@babel\plugin-transform-typescript\lib\index.js' imported from C:\Users\admin\Desktop\Full Typescript Projects\cognito 1.0\COSMO\node_modules\.pnpm\[email protected][email protected]_@[email protected][email protected][email protected][email protected][email protected]_\node_modules\vite-plugin-vue-inspector\dist\index.mjs
Did you mean to import "@babel/plugin-transform-typescript/lib/index.js"?
...

Nuxt build move prisma/client to devdependencies

Hello, I am trying to build my project with nuxtbuild when I run the command pnpm run build (npx prisma generate && nuxt build) The client generation works fine ```...

NuxtImage: Relative import

Hey 👋 I am currently working on a website that will be deployed on a server subdirectory (like domain/directory). My goal is to build the app using relative path, so I can change the directory later without rebuilding the app ( I guess baseURL does not work for that). I manage to make the import for /_nuxt/ working using cdnURL: './', but for some reason, public images used by <NuxtImage> and the provider ipx does not follow this rule ...

How to authenticate my Nuxt 3 app users on Laravel Passport ?

Hello Nuxt community, I'm currently migrating a Nuxt 2 app which authenticated its users on Laravel Passport, through OAuth2 with PKCE flow. That authentication was made with the amazing @nuxtjs/auth-next module. After searching the whole Web, I'm afraid Nuxt 3 does not have such a tool......

Breaking app when awaiting composable in page setup

I have a pretty barebones use case that seems like it shouldn't be breaking things. On my page setup, I do the following: ``` <script setup lang="ts">...

Big performance regressions happing after adding large amount of redirects (3000+) inside routeRules

Hi! Is anyone here maybe familiar with big performance regressions happing, after adding a very large amount of routeRules entries (3000+ redirects) to nuxt.config.ts ? I see this happening in my project. I am trying to see why it is happing. Every Nuxt page has about a ~10x decrease in initial HTML response time after adding the redirects. As a test, a blank Nitro application configured with the same routeRules does not show this performance regression. Has anyone experienced this?

Vue : Cannot find name

Hello, I've been getting this anoying errors in my fresh project in nuxt 3. I've copied almost everything like in my previus project where this does not happen with imported types. There are diferences in vue and nuxt versions. I've included screenshots of my package jsons....
No description

Unable to use MySQL as connector in Nitro database configuration

nuxt.config.ts:
nitro: { experimental: { websocket: true,...