Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

A route that returns either txt/xml (server route) or Vue (pages route)?

I'm replacing a legacy site with a particular URL structure that I need to maintain. Unfortunately the Nuxt route patterns aren't expressive enough and I can't find a workaround. The paths I want to maintain are /rfc/rfc1.xml as a server route, and /rfc/rfc1 as a pages Vue route. The filename-pattern in the server or pages directory would be [id].ts but then Nuxt prefers the server route over pages, and there's no way to narrow the server route with patterns like [id].xml.ts (not...

Website not working on prod, no useful errors.

I simply get this error, it works fine in dev mode, or preview mode on my machine. Would be useful to know how to get more detailed errors. Nothing in the logs (server side) and nothing in the client console. At this point I'm not sure where this goes wrong.
No description

loggedIn.value always false

I'm actually new to Nuxt. I tried the tutorial for authentication, and it works well on my computer with docker. When I try to deploy it on my vps, I have an issue with it. loggedIn.value is always false. I check my authentication api, and it doesn't throw an error. I check the server side of nuxt and there is no error too. I can provide code if needed. I'm really confused now.

Selecting data in UTable without rendering checkboxes

I'm using UTable from nuxt/ui and I'm trying to highlight the selected row by using the v-model on it but the problem is it renders checkbox on each row. I tried using @select handler without using v-model but it doesn't work.

Usecookie and isr cache conflict

usecookie cookie resets to default after isr cache is refreshed. So i have this code // Cookies const cookieBannerDismissed = useCookie("cookieBannerDismissed", { default: () => false, maxAge: 60 * 60 * 24 * 30, // 30 days in seconds path: "/", // Set the cookie for the root path...

nuxt ui use button as regular link

to and href both use NuxtLink!! what do i do?

in nuxt, where do i specify the context's types?

```ts export default defineEventHandler(async (event) => { const config = useRuntimeConfig(); ...

In nuxt, where to specify compile-time flags?

With a Vue+Vite app, you can specify some compile-time flags like below. For instance, I never use Options API, and apparently disabling it saves ~10kb off your final build. How can I do the same in Nuxt?...

Nuxt UI v3 Calendar Heading

Hey, we're migrating our project to the new UI v3. Our site uses i18n to support multiple languages and we are struggling to find a way to set the language of heading in the Calendar component....

Empty Nuxt 3 project seems to leak memory locally only in dev mode after second launch

If I run npx nuxi@latest init MyProject then npm run dev close the process and repeat npm run dev (also applies to all further runs)...
No description

my project's GUI suddenly ran out of color (nuxtui3/tailwind4)

Hey'all, I'm absolutely going mad here and I'd really appreciate your help. I've been working all week long on a project and just as I've deployed the final changes for today, I've noticed that all of my GUI suddenly lacked color on the server. Checked it with multiple devices, with the same result. I re-ran build + deploy, no avail. Restarted the project locally, now the local build is black and white here too, what in the!? Everything else works fine, no errors are thrown, it's just that tailwinds colors / nuxtui3's theme colors cannot be resolved, it seems....

addAbortListener import broken on NuxtHub deployment

ISSUE FIXED - Update all dependencies to newest versions. Especially nuxthub/core and nuxt - Add an enviroment variable to your deployment either in nuxthub or directly in cloudflare: Type: text, Name: NODE_VERSION, Value: 23 ...

Reading public env var in lib script

I have lib/index.js and my code is: ```js const client = new Client() .setEndpoint(process.env.NUXT_PUBLIC_APPWRITE_ENDPOINT) .setProject(process.env.NUXT_PUBLIC_APPWRITE_PROJECT_ID);...

unable to verify the first certificate

Hi Nuxt community! I recently got a new laptop and I'm trying to create a new project on it. I am running Nuxt as a frontend and Laravel as backend. I cloned the project down from github and imported the SSL key and certificate from the old laptop but they were not accepted. So I created a new certificate and key using: ``` openssl genrsa 2048 > server.key chmod 400 server.key...

Wildcard routes that vary by file extension that Nuxt interprets as overlapping routes

I'm replacing a site with two server routes at /rfc/rfcN.json and /rfc/rfcN.txt and an HTML route at /rfc/rfcN/ where the N is a number. Making files in server/routes/rfc/ named [id].txt.ts and [id].json.ts doesn't result in Nuxt serving each route distinctly. Should I use a single route file that handles them all (if so how do I handle server and vue routes?), or middleware to redirect, or what?

net::ERR_CONTENT_LENGTH_MISMATCH 200

With no changes to my code and running the latest Node 22 (v22.14), my application is suddenly not served properly anymore. When running the npm run dev command, everything boots up normally according to the console. However, when navigating to the site, I only get a blank page. Opening the dev tools reveals a bunch of errors like this: ``` GET http://127.0.0.1:3000/_nuxt/@fs/D:/<snip>/node_modules/tailwindcss/tailwind.css net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK) play:1 ...

Access Cloudflare bindings from scheduled task

Is it possible to access the cloudflare bindings on the context in a scheduled task? I have this in my run method: ```...

NuxtImg IPX 429 issues

If i have our images domain, inside images.domains of nuxt config, the site will eventually 429, if i comment out the domain, it does not 429. Im currently just running locally - but why might this be?

Nuxtjs/I18n not initialising properly

We used the nuxtjs/i18n v8.0.0-rc3, and now started upgrading to v9.2.1. We are using Nuxt v3.8.0. On trying to initialise the library in Nuxt solution we am getting different errors. I've tried everything I could and I can't seem to figure out what I'm doing wrong. in nuxt.config.js we defined the modules: ```modules: [ '@nuxtjs/i18n', './modules/01_defineRuntimePlugins',...

Is nuxt-security important ?

Hello Is nuxt-security mandatory to have a safe Nuxt 3 website, or is it mainly for an extra layer of protection ? Disclaimer : I use nuxt as a front only, hosted on cloudflare pages. ...