Nuxt

N

Nuxt

Nuxt Community Chat Server

Join

Access usb devices on server side

Curious if it was possible to use SerialPort and or another package to stream video and serial to and from a Nuxt 3 application, and how I should go about it. I've figured out how to access both devices client-side where the usb devices would be connected, but I want to be able to host this in a docker container to make the devices available if on another machine. Currently I check to see if the application is deployed on a static deployment site like Cloudflare Pages, and if its not I would want it to run in server mode. Any ideas on how I could implement this as I don't see much of anything with Nuxt interacting with server side devices....

Install Module from Github Repository

Hello, I created a Nuxt module for my personal projects, with the initial template, to share some logic, is it possible to install this module from the Github repository, and not through npm? Example: npm install <github-repository-link>...

Connecting to External Websocket

I need to connect to the StreamElements platform to receive events when viewers of a stream follow, subscribe, etc. This is their example: ```js const socket = io('https://realtime.streamelements.com', {...

NuxtI18n - Access global i18n outside of components or even composables

I am trying to implement NuxtI18n after using VueI18n. In some composables, I can use useI18n() or useNuxtApp().$i18n. How can I achieve the same behavior as the code below in nuxtI18n? ```js // some utiltiy file that may be ran in a worker or outside ...

How to access buildId/build hash at runtime?

I've been trying to figure out how to access the build id/hash on the server side at runtime, so that I can build something from the client side to detect when a new version of my code has been released (e.g., expose the build hash via server API, periodically query it or build a websocket to monitor for change, etc.). Anyone know how to do this? The only things I've been able to find in this vein require either (1) hardcoding the buildId via config, or (2) intercepting, overriding, and storing the default hash generation in the "build:before" lifecycle hook. I'm hoping there's just a simpler, out-of-the-box way to access the existing generated ID. Thanks in advance!...

@nuxt/icon with histoire?

How the hell to get @nuxt/icon working with histoire?

Nuxt Content for Static Site Generation

Hi, I'm using Nuxt Content with markdown files. It works fine in development and when I generate production builds. The problem occurs when I try to disable SSR (Server-Side Rendering). An error appears when loading a markdown file: Document not found, overwrite this content with #not-found slot in <ContentDoc>....

"Cannot find module " in build or production

Hi. I am pretty new to Nuxt & Vue and have a project with a component framework named "devextreme" (https://js.devexpress.com/Vue/Documentation/Guide/Vue_Components/Add_DevExtreme_to_a_Vue_Application/#Additional_Configuration_for_Vite/Using_Nuxt) which does not support SSR. As i also use nuxt_oidc_auth which requires SSR enabled, i simply added .client to all components, composables and plugins i created for devextreme, as stated in their docs. i created a plugin to import the data handling components, ...

How can I redirect from server api?

I’ve set up Axios in the server/api folder, and my APIs are working well for fetch, update, delete, etc. However, I’m facing an issue with token expiration. When the token expires, API will returns an error, and I want to redirect the user to the home page so they can log in again. I’ve used Axios interceptors to detect the error and log it to the console, but I’m stuck on the redirect part. I can’t use useRoute, redirect, or navigateTo due to the error "vue app aliases are not allowed in server runtime."...

Issue accessing studio data within application

I have this it renders on https://nuxt.studio without any issues and I can alter the options, how do I access this object in my app? If I use const config = useAppConfig() it just gets the locally defined app config and doesn't access the details from the studio. ``` import { field, group } from "@nuxthq/studio/theme"; export default defineNuxtSchema({...

Lazy loading components outside of /components

Hello! I know we can prepend "Lazy" to a component name to lazy load it. But would it work if the component is explicitely imported from somewhere else than /components? Like this: from...

Reduce worker size on Cloudflare ☁

Hi, I was deploying simple site having 6 pages, no API endpoints + Nuxt SEO. While I was deploying it over the edge, I'm getting error from worker size limit (1MB on free plan) which is mentioned in this blog: https://nuxt.com/blog/nuxt-on-the-edge...

Nuxt layout help

What is the accepted way to set the background of a layout? So the slot inside it falls in that background? Also how can I store my components for my layout correctly? Do I just keep them in components it feels like a bad way to store them so seperatly...

Environment Variables are unusable but are able to be logged

I am trying to connect to a Supabase instance, I can run console.log on the environment variables and see the logs in the console are correct. However when I try to run createClient I recieve a 500: supabaseUrl is required error. ``` import { createClient } from "@supabase/supabase-js"; ...

Custom Error page.

Hello everyone! I have built a custom error page but I am also using catch all route. ([...slug].vue). Now, it has become very hard to catch those errors. if i am getting 500 error it will not catch it and display it etc. any advice in the matter is appreciated.

Shared API client wrapper cookie token

Hello, I've a plugins/api.client.ts file that defines a Nuxt plugin to provide my httpClient (it is a library that wraps all my REST APIs). However, I need to initialize it with the token stored in the browser cookie. The problem is that when I change the page, the token becomes undefined. ```ts export default defineNuxtPlugin(nuxtApp => { const { setAccount } = useAuthStore();...

Adding type safety with Valibot

Not strictly nuxt related but I'm having trouble making my request data type safe with Valibot. I have the schema defined in my server route: ```ts...
No description

Proxy Nitro

Hey guys, I hope you are well, I faced with a problem using proxy nitro for certain route I chose brightdata proxy and everytime get it Failed to load resource: net::ERR_UNEXPECTED_PROXY_AUTH, is there good example of using real proxy for api route
No description

Local development : run nuxt.com on windows

Hello there, I tried to launch the nuxt.com project locally on my computer (windows) by following the README.md. Except that when I navigate to the documentation part, I always get a "page not found" error. However, I correctly configured the path via the NUXT_DOCS_PATH variable....
No description

Layer override / File override

I've been working a little with layers. Only just realized i could have each layer as a sub repo's instead of a monorepo. But my question. Lets say i have a composable ~/composables/useCurrentUser.ts in an auth layer. If i recreate that file and function in my app project, basically "overriding" the layer with different logic. Will nuxt use my app project logic instead of the auth layers'? Extending this, when using drizzle, you gotta generate migrations once in a while. Which seems to be quite picky with specifically using drizzle-kit commands to generate them. So would it be possible to get the full paths of files in each layer ./server/db/schema/*.ts while still respecting the "overriding" from other layers and app project....
Next