Sam  K
Sam K
NNuxt
Created by ZaKk on 8/11/2024 in #❓・help
api 404
if it's public yes 🙂
44 replies
NNuxt
Created by ZaKk on 8/11/2024 in #❓・help
api 404
hey, a minimal reproduction in stackblitz or code sandbox would be nice to be able to debug the issue
44 replies
NNuxt
Created by tobi on 7/8/2024 in #❓・help
Nuxt separate API and app for production
worked on an ecommerce with NextJS and build and deploy time was around 20 - 25 min. we had to remove the gh workflows as the bills was getting bigger and build locally 😂
14 replies
NNuxt
Created by QRST on 7/8/2024 in #❓・help
Fetch Server Help!!
file: server/api/hello/[id].ts
export default defineEventHandler((event) => {
const id = getRouterParam(event, 'id')

return `Hello, ${id}!`
})
export default defineEventHandler((event) => {
const id = getRouterParam(event, 'id')

return `Hello, ${id}!`
})
from the docs
4 replies
NNuxt
Created by QRST on 7/8/2024 in #❓・help
Fetch Server Help!!
hey, you can use dynamic params in the server routes https://nuxt.com/docs/guide/directory-structure/server#route-parameters
4 replies
NNuxt
Created by tobi on 7/8/2024 in #❓・help
Nuxt separate API and app for production
I am getting around this with a npm workspaces, having the spa as nuxt app and the server with plane nitro. is a bit more complex to setup at first but it made my life easier and more flexible
14 replies
NNuxt
Created by adamreisnz on 6/21/2024 in #❓・help
Nuxt 4 nightly failing on nuxt prepare command
yea that was before 3.12.2
5 replies
NNuxt
Created by adamreisnz on 6/21/2024 in #❓・help
Nuxt 4 nightly failing on nuxt prepare command
I have faced the same problem, and removing nightly and install the latest 3.12.2 and set
future: {
compatibilityVersion: 4
},
future: {
compatibilityVersion: 4
},
remove node_modules .nuxtand lock file of your package manager and install everything again
5 replies
NNuxt
Created by Sam K on 6/21/2024 in #❓・help
How to add new hooks to Nuxt from a module?
thanks, the links they only show how to type the custom hooks. there's no info on how to register them
3 replies
NNuxt
Created by Emanuel on 6/21/2024 in #❓・help
Nuxt 3 Modules provide Types to Nuxt Applications
4 replies
NNuxt
Created by Nenad Novakovic on 5/27/2024 in #❓・help
Read files in API route, fails on Vercel
is it normal ssr or vercel edge? In my case whenever I need to read files in Nuxt/Nitro I use useStorage as it provides better typed and also to not enter the loophole to where are my files 😂. this is nito's docs on useStorage https://nitro.unjs.io/guide/assets
5 replies
NNuxt
Created by salomon_. on 5/28/2024 in #❓・help
How to manage 'remote' localization
hey, take a look at in-component translations https://i18n.nuxtjs.org/docs/guide/per-component-translations
5 replies
NNuxt
Created by JonathanDoerfler on 5/23/2024 in #❓・help
How to typescript UInput?
16 replies
NNuxt
Created by JonathanDoerfler on 5/23/2024 in #❓・help
How to typescript UInput?
welcome 🙂 could you try instead of ?? to use HTMLElement I am on the phone now, later I'll check in a project that I have Nuxt UI in
16 replies
NNuxt
Created by JonathanDoerfler on 5/23/2024 in #❓・help
How to typescript UInput?
No description
16 replies
NNuxt
Created by Smako on 5/23/2024 in #❓・help
How do I manipulate heavy SVG files?
It depends on what you are trying to do. You can also import svgo into your code and customize the behavior. Also take a look at https://lottiefiles.com.
9 replies
NNuxt
Created by JonathanDoerfler on 5/23/2024 in #❓・help
How to typescript UInput?
if the root html element inside <UiInput /> is an input you don't need the el.value.input.focus would be just el.value.focus();
16 replies
NNuxt
Created by Thr0nSK on 5/23/2024 in #❓・help
Memory management in Nuxt
On the server side Nuxt does an excellent job at handling this stuff as people can get a bit careless. take as an example, recently the Nuxt team introduces useRequestEvent() that can run inside .vue components, if you do this
<script lang="ts" setup>
const event = useRequestEvent()

if (process.server) console.log(event)

if (process.client) console.log(event) // will be undefined
</script>
<script lang="ts" setup>
const event = useRequestEvent()

if (process.server) console.log(event)

if (process.client) console.log(event) // will be undefined
</script>
In terms of requests the defineEventHandler i believe it respects the session and request data so private data it's not leaked unless us the developers return data from the server that it should not be exposed. For hooks I used them in modules and plugins and they respect where they should run. Please I am intrested in this topic as well as I am building a lot fo ssr latley, so please if you find something intresting let us know 🙂
6 replies
NNuxt
Created by JonathanDoerfler on 5/23/2024 in #❓・help
How to typescript UInput?
the html inside UInput the wrapper element is it an input? if It's an div or so you can use HTMLElement
16 replies
NNuxt
Created by LighterChu on 5/22/2024 in #❓・help
Adding npm packages to Nuxt3
@LighterChu this module nuxt-video-player is for Nuxt 2. Take a look at vueUse library that has a lot of awesome perks. For working with video you have this composable https://vueuse.org/core/useMediaControls/
2 replies