dwol
dwol
NNuxt
Created by IsaacR943 on 11/19/2024 in #❓・help
Error deploying to fly.io
Hmm okay that is unfortunate. This is definitely something I'll need to look into
10 replies
NNuxt
Created by IsaacR943 on 11/19/2024 in #❓・help
Error deploying to fly.io
Were you able to sort this out at all? Im running into a similar issue
10 replies
NNuxt
Created by deetstrab on 12/1/2024 in #❓・help
Dynamic Nuxt Form Validation
Sorry if I’m not being clear, using z.array does work for us.
10 replies
NNuxt
Created by deetstrab on 12/1/2024 in #❓・help
Dynamic Nuxt Form Validation
We have something similar but we use zod with the :schema prop on UForm. For the schema the property is an array and you use the z.array(). I know that’s not super helpful because you are using a custom validate function but we’ve been pretty happy with zod so I think it’s something worth to look into
10 replies
NNuxt
Created by Timothy Yin on 10/14/2024 in #❓・help
How to prerender Nuxt Content when ssr is disabled?
The only way I’ve found to reliably do this is with setting ssr to true. You can still run generate with ssr: true. There’s also the experimental/ client build config option but it doesn’t seem very reliable for me.
3 replies
NNuxt
Created by eym on 10/13/2024 in #❓・help
using ref alongside conditional rendering (useTemplateRef + v-if)
Are you sure the verify mobile component is mounted when you try running the start countdown function? You might need to ‘await nextTick()’ or use a setTimeout
3 replies
NNuxt
Created by jovan on 10/8/2024 in #❓・help
@nuxtjs/i18n test errors
Glad you got it working!
19 replies
NNuxt
Created by jovan on 10/8/2024 in #❓・help
@nuxtjs/i18n test errors
I’m not at a computer right now so it’s not easy to link stuff but if you lookup ‘setup files’ for the vitest config you should be able to set it up for every test.
19 replies
NNuxt
Created by jovan on 10/8/2024 in #❓・help
@nuxtjs/i18n test errors
Ex: instead of testing AppSettings try creating and testing a basic component like a HelloWorld or something like that
19 replies
NNuxt
Created by jovan on 10/8/2024 in #❓・help
@nuxtjs/i18n test errors
I would try creating a test with a simple component to see if it’s something else causing the issue.
19 replies
NNuxt
Created by jovan on 10/8/2024 in #❓・help
@nuxtjs/i18n test errors
Yes using createI18n from vue is correct. I’m using this in my projects.
19 replies
NNuxt
Created by jovan on 10/8/2024 in #❓・help
@nuxtjs/i18n test errors
Sorry for the formatting, I’m on mobile.
19 replies
NNuxt
Created by jovan on 10/8/2024 in #❓・help
@nuxtjs/i18n test errors
You need to create an i18n plugin for your tests. I have a mocks/i18n.ts import { createI18n } from 'vue-i18n' import en from '~/locales/en-CA' import fr from '~/locales/fr-CA' export const enI18n = createI18n({ legacy: false, locale: 'en-CA', messages: { 'en-CA': en } }) export const frI18n = createI18n({ legacy: false, locale: 'fr-CA', messages: { 'fr-CA': fr } }) export const randomI18n = createI18n({ legacy: false, locale: 'ja', messages: { ja: en } }) Then import your i18n mock and use in your component: const wrapper = await mountSuspended(MyComponent, { global: { plugins: [enI18n] } })
19 replies
NNuxt
Created by Stefan on 10/7/2024 in #❓・help
nuxt3 with nuxtUI Failed to resolve component UPage
UPage is a pro component, do you have nuxt ui pro? If not then you won’t be able to use this component.
2 replies
NNuxt
Created by souf on 9/27/2024 in #❓・help
NuxtLoadingIndicator
I'm not sure if/how you can trigger it manually but in the docs for it theres a link to the composable they use to control it, I would start there.
5 replies
NNuxt
Created by CorrM on 9/26/2024 in #❓・help
Get `statusMessage` from $fetch
import { FetchError } from 'ofetch'
export function logFetchError (error: unknown, message: string) {
if (error instanceof FetchError) {
const e = error as FetchError
const status = e.response?.status ?? 'Unknown Status'
const statusText = e.response?.statusText ?? 'Unknown Status Text'
const hasMessage = e.data?.message !== undefined

console.error(`${message}: ${status} - ${statusText} ${hasMessage ? `--- ${JSON.stringify(e.data)}` : ''}`)
} else {
console.error(message)
}
}
import { FetchError } from 'ofetch'
export function logFetchError (error: unknown, message: string) {
if (error instanceof FetchError) {
const e = error as FetchError
const status = e.response?.status ?? 'Unknown Status'
const statusText = e.response?.statusText ?? 'Unknown Status Text'
const hasMessage = e.data?.message !== undefined

console.error(`${message}: ${status} - ${statusText} ${hasMessage ? `--- ${JSON.stringify(e.data)}` : ''}`)
} else {
console.error(message)
}
}
4 replies
NNuxt
Created by dmarr on 9/25/2024 in #❓・help
How to test the side effect of a watcher function?
you can change the timeout to whatever would be more appropriate for you, in this case it's a debounced watcher
6 replies
NNuxt
Created by dmarr on 9/25/2024 in #❓・help
How to test the side effect of a watcher function?
This is the only way I got my assertions to work when testing a watcher
await new Promise<void>((resolve) => {
setTimeout(() => {
expect(...assertions here)
resolve()
}, 1000)
await new Promise<void>((resolve) => {
setTimeout(() => {
expect(...assertions here)
resolve()
}, 1000)
6 replies
NNuxt
Created by Patrity on 9/13/2024 in #❓・help
Not fetching Supabase data
Did you try just returning the supabase call instead of destructing it and returning the data
20 replies