Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Nuxt Auth Utils and external bearer tokens

We are currently in the process of moving an internal site from Vue 2 to Vue 3 and are likely using Nuxt as the final destination. I'm currently looking at how the Nuxt application will communicate with the existing API server (Hapi.js), and more importantly how that server will authenticate requests once users have been authenticated on the frontend I am at the point where nuxt-auth-utils is retrieving an authenticated user and displaying the { user } details on the front-end using useUserSession...

Should a starter project go in a folder in a repo or the root?

Hi! I've been reading about vue and nuxt recently would like to give it a swing. But I got the most silliest and basic of questions. I created a new github repo, nuxt-test-app and put a devcontainer in there. I opened the repo in a codespace and created the starter app using the vscode nuxtr extension. Now my repo structure looks like: nuxt-test-app/.git/{git stuff}...

Web scrapping for youtube embedded video URLS with nitro.

This isn't a nuxt question, but seems puppetteer (webscraper) doesn't work properly inside nitro. I'd like to know how I can use it for getting the first youtube video from a query, and embedding the youtube link inside my page.

Nuxt Content with Shiki syntax highlighting not working

I can't seem to get the the shiki syntax highlighting to work as expected. I would expect the code block to be rendered with the ability to scroll to the side if the code extends the width of the container. Also, the themes aren't getting applied like I would expect. The file name doesn't show up. It seems that there is something wrong when styles are being generated in the <ContentRenderer /> component. You can see in my screenshot here that nothing is being generated in the style attribute. My guess is that there is an issue with the nuxt/tailwindcss module in that it is defaulting to v7 which is still in beta. Has anyone else run into this? This is a fresh nuxt content build that I just spun up yesterday....

Running Nitro Tasks?

Hi, I am looking for a way to seed my DB locally (NuxtHub SQLite, with Drizzle). I read about (experimental) Nitro Tasks (https://nitro.build/guide/tasks), which sound like a good fit. Unfortunately, I didn't find a way to trigger Nitro tasks. Nitro tasks are not runnable via nuxi cli, just via nitro cli: npx nitro task run db:seed:test. ...

Conditional rendering inside v-for not working properly?

I have the following template code: ```html <template> <div class="grid md:grid-cols-3 gap-2"> <div v-for="stat in stats" :key="stat.label" class="bg-white p-6 rounded-md">...
No description

Supabase Authentication

i'm using nuxt3 with supabase, and when i'm logged in authentication token persist in cookies all time, how to configure this ?

net::ERR_ADDRESS_UNREACHABLE

I try to access a local API on my laptop (Docker container run by OrbStack). However, when fetching the URL, Nuxt returns net::ERR_ADDRESS_UNREACHABLE in the console. I don’t understand what I am missing knowing that it does work with other apps like Hoppscotch.

Tailwind just does not wanna go with darkMode = "class"

ColorMode package installed and configures Tailwindcss config file exposed darkMode = "class" set But at the end tailwind just does not care and look at systems preference no matte how much i change html's class with "dark" or "dark-mode" or "light" or "light-mode"...

Nuxt layers: Cant import scss files in a layer

```bash ERROR Pre-transform error: [sass] Can't find stylesheet to import. ╷ 5 │ @use 'assets/scss/modules/normalize'; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Cannot find name 'useRuntimeConfig'.

Nuxt 3.16.1 + Bun + Docker: Server-side auto-imports not working useRuntimeConfig() shows "Cannot find name" in server API routes despite: ✅ .nuxt/types/nitro-imports.d.ts exists with correct declarations ✅ tsconfig.json includes the nitro-imports file ...

Force refresh after new deployment? [Vercel]

I'd like to force reload the Nuxt app (in Universal mode) of every user after I've deployed a new version. As far as I understand there is an auto-reload if a chunk file is 404, but that's not always the case. What would be a good way to implement this? A manual trigger would be fine.

Extending public runtime config type

I have a featureFlags property on my runtimeConfig.public config. However, when I try to do something like:
const { featureFlags: runtimeFeatureFlags = '' } = useRuntimeConfig().public;
const featureFlags = ref(runtimeFeatureFlags.split(','));
const { featureFlags: runtimeFeatureFlags = '' } = useRuntimeConfig().public;
const featureFlags = ref(runtimeFeatureFlags.split(','));
...

How do you get coverage set up with Playwright?

I've tried using the vitest test runner with istanbul coverage but it doesn't report coverage for playwright tests. I've also tried using the playwright test runner but can't seem to get coverage working with that at all. Any help would be greatly appreciated. 😃...

Nuxtimage custom provider issue

I have created customer provider file accroding nuxt image documentation but got thid error module '"#image"' has no exported member 'defineProvider' import { joinURL } from 'ufo' import { createOperationsGenerator, defineProvider } from '#image'...

how do I trigger form validation only when submission is attempted?

export type FormInputEvents = 'input' | 'blur' | 'change' | 'focus';

Create documents with sanity module

Im trying to use the sanity module to create documents, but it returns insufficent permission. I have tested it with a curl on the endpoint with the same token and it lets me create and i have checked that the token is set. What could be the cause. Is it possible to log the outgoing requests auth token directly?

When does the timeline NuxtUI component release?

Can't seem to make it work, I'm guessing the "soon" tag means it can't be used yet. Is there an ETA for when I could use this? Please tag me when responding, thanks! https://ui.nuxt.com/components/timeline...

Nuxt Sanity module, unable to connect when some routes are pre-rendered.

Hey everyone, I'm currently working on a project using Nuxt Sanity module. It works great when deployed to Netlify (nitro preset netlify), but as soon as I prerender some routes with routeRules in my nuxt.config file, the live preview stops working, and I get this message: Unable to connect, check the browser console for more information. In the console, I'm also getting this error: Unable to connect to visual editing. Make sure you've set up '@sanity/visual-editing' correctly. Ideally, I'd like to keep some routes static while still using the server routes for the live preview (/preview/enable and /preview/disable). Any idea how I could do that?...

persistne issue during any nuxt3 app init: ERROR Cannot read properties of undefined.

during installation of any new nuxt3-app I am experiencing an issue, it seems to be global, anyone could share some hints how to fix it?
No description