Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Cloudflare pages 404?

im in nuxt an i deploy with cloudflare pages. When i visit the site a 404 show up and i have to click 'go home' that uses router link to '/' to see the actual page. This is very odd because when i visit the same path 'myapp.com' or 'myapp.com/' the error 404. Despite this when i click 'go home' (set to go to the route '/' ) it shows the page. Doesnt make any sense

read stream from event twice

I'm trying to find a way to read a stream (from an h3 event ) twice. Once to chez its size and once to actually use it. I tried this: but .values doesn't exist on req ```...

nuxt-umami module not found during typecheck despite being installed

I'm running into an issue with nuxt-umami in my project. When running pnpm lint (which runs nuxt typecheck && eslint .), I'm getting this error: ERROR: Could not load nuxt-umami. Is it installed? However, nuxt-umami is definitely installed in my package.json:...

Nitro useStorage use Brotli encoded json data

I have a Nuxt server route that should deliver a 400kb Brotli encoded JSON object. The json file is delivered over a custom server api route, because I need to set some custom headers for cache management with etags and set the correct content-type header. How do I read the file correctly and make it fetchable by the user? This is my current code: ...

How to intercept/log server side errors?

Hey, I am trying to send notifications to the dev team server whenever there's an unexpected error on the backend (500 errors) but i am not sure how.

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 ...