Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

connection is not secure, even after configuring https in nuxt.config.ts

Hi, I'm relatively new to nuxt. I'm attempting to enable https in my development environment. All tutorials I've seen refer to using localhost, but I'm developing on a local server so I'm not sure what to do differently. I've updated my system hosts file so example.com (here changed to obscure my exact setup) redirects to my development server. I've generated certificates using mkcert and updated my nuxt.config.ts with the following: ``` devServer: { host: 'example.com',...

Is it possible to make a Promise globally available on every page?

I want to have access to a Promise on every page because I need to see, if the action is done yet, on other pages. I am using vue-sonner with toast.promise. The problem: I want to create a toast using a composable and the promise state should be reflected on other pages too, but it seems like the Promise is only active and resolvable on that page, where it is created. The promise is pending till I move back to the page, where it was created. Is this even possible?...

Nuxt UI Pro - Docs template

When running the direct CLI on the repo page: npx nuxi init -t github:nuxt-ui-pro/docs#v3 I get this output: ```ts...

Build error after upgrading to 3.15.4 - No "exports" main defined ... unicorn-magic 🦄

Full error after npm run build:
[nuxi 8:26:08 AM] ERROR Nuxt Build Error: [vite:css] [postcss] No "exports" main defined in /Users/david.marr/code/xyz/node_modules/globby/node_modules/unicorn-magic/package.json
file: /Users/david.marr/code/xyz/src/assets/css/tailwind.css:undefined:NaN
[nuxi 8:26:08 AM] ERROR Nuxt Build Error: [vite:css] [postcss] No "exports" main defined in /Users/david.marr/code/xyz/node_modules/globby/node_modules/unicorn-magic/package.json
file: /Users/david.marr/code/xyz/src/assets/css/tailwind.css:undefined:NaN
...

Typescript error when not destructuring useAsyncData

Hey there! I have multiple client requests to do in a page so I feels more convenient to not destructure the composable useLazyAsyncData(). ```ts const request = await useLazyAsyncData(() => ({}), { server: false })...

i18n doesnt fully refresh the page

i18n stores a cookie of the locale, so when fetching the root page it redirects, instead of fully refetching the page, it tries to do the redirect from the client and fails

async plugins with await - typescript angry

I'm curious what I'm doing wrong here. It almost seems like a nuxt TS bug. If I remove "provide" from the resolve within the IF statement the TS error disappears (but then $ketch doesn't actually exist), but if I run it as is, it works fine.
No description

useScriptGoogleTagManager returns void

Hello, I'm trying to use useScriptGoogleTagManager ```ts const { proxy } = useScriptGoogleTagManager({...

Test plugin of useNuxtApp vitest

Hello all, I don't know how to test one of my services I pass through useNuxtApp. I use @nuxt/test-utils and my component got a ...

lint+prettier integrations/issues in vscode

hey folks,can someone point me to a nuxt example project with linting and formatting rules? I managed to get it set up but having an issue where the built in formatter is not respecting the formatting rules. is there a proper way to link it to a prettierrc? here'swhat i got so far......

Input background color does not work

For testing purposes, I want my input fields to be red. I created an app.config.ts: ```ts console.log("app.config.ts"); export default defineAppConfig({...
No description

Remove stack from createError()

How to remove stack from the return createError() function?

nuxt js dev server starts up very slowly

my nuxt js project start ups very slowly I am starting it with yarn dev command

How to make Multiple Transition

How to use a multiple transition inside the transition, for example this is my code. Is this the correct way to use multiple transition?

preflight with 204 no content

Hello everyone. Due to unfortunate downsizing, I must handle the project with 2 Vue clients. I have never done any client development before, but one seems to use Nuxt 2 (A), and the other uses Vite(B). They are used in mixed ways. However, (A) mostly serves users who are not signed in, and (B) serves users who are signed in with the app.domain. The production service is working fine, but I am trying to restore the dev server. Fortunately, as the codebase is structured with dockers, I at least succeeded in making them run. However, I am having a hard time calling backend APIs from the client apps. ...

How to get a rich text editor in Nuxt Content/Nuxt Studio

I'm not interested in markdown, instead I'd like a rich text HTML editor as you'd find in a regular CMS's. Is this possible? What about a Vue component that wraps a an editor? Is that what I should be doing?...

Moving `content` directory under `src/`

Hi, total newbie to the Nuxt ecosystem. I am trying out the default project template, and am struggling to find a way to effectively move the content folder under src/. I thought that setting the srcDir property would be enough, but it seems that content is unaffected by that. Is this achievable or not as of Nuxt 3?...
No description

refresh page after back to tap on mobile

Hello, l created a login by metamask using wagmi.sh. all connectors and logic are in modal which is inside app.vue l have problem with the following case: When I choose MetaMask, the SDK redirects me to the MetaMask app to connect the wallet. However, after manually returning to the page, the app refreshes, and the modal closes. any idea why?...

Best Practices for SSG in Nuxt 2 with External Router Structure?

Good day, beautiful fellow developers! I hope you're all having an amazing day! I'm currently working on a Nuxt 2 project that combines local pages with a router structure fetched from an external API, which is then used with the nuxt-community/router-module. Our site works both in SSR for development and SSG for production. ...

Build failing with typescript error in [email protected]

My "nuxt buid" is failing with this error: transforming (31) nodemodules.pnpm\[email protected]@parcel+watcher_affb1ef70870c18232d7085a01aeb44d\node_modules\nuxt\dist\app\components\nuxt-root.vueerror TS5042: Option 'project' cannot be mixed with source files on a command line. Setting the typescript typecheck property to false make the build pass in nuxt.config.ts but obviously tha't's not something I want....