dmarr
dmarr
NNuxt
Created by Mads on 2/20/2025 in #❓・help
Typescript intellisense extremely slow
if you use @Anthony Fu/ni:
nlx vue-tsc --noEmit --listFiles | grep -E '\.vue$|\.ts$|\.tsx$' | xargs -n1 stat -f "%z %N" | nlx webtreemap-cli
nlx vue-tsc --noEmit --listFiles | grep -E '\.vue$|\.ts$|\.tsx$' | xargs -n1 stat -f "%z %N" | nlx webtreemap-cli
or you'd change out nlx there for your own (npx, pnpx, bunx)...
14 replies
NNuxt
Created by Mads on 2/20/2025 in #❓・help
Typescript intellisense extremely slow
that command won't work on a mac fyi
14 replies
NNuxt
Created by Jovan Kočić on 2/14/2025 in #❓・help
Pinia store with Nuxt layers
^ in your layer's nuxt.config
10 replies
NNuxt
Created by Jovan Kočić on 2/14/2025 in #❓・help
Pinia store with Nuxt layers
import { createResolver } from '@nuxt/kit';

const { resolve } = createResolver(import.meta.url);
import { createResolver } from '@nuxt/kit';

const { resolve } = createResolver(import.meta.url);
10 replies
NNuxt
Created by Jovan Kočić on 2/14/2025 in #❓・help
Pinia store with Nuxt layers
pinia: { storesDirs: [resolve('./src/stores')], },
10 replies
NNuxt
Created by Jovan Kočić on 2/14/2025 in #❓・help
Pinia store with Nuxt layers
esp if you are using a custom srcDir
10 replies
NNuxt
Created by Jovan Kočić on 2/14/2025 in #❓・help
Pinia store with Nuxt layers
in your layer, you have to set the storesDirs using a resolver
10 replies
NNuxt
Created by dmarr on 2/13/2025 in #❓・help
Build error after upgrading to 3.15.4 - No "exports" main defined ... unicorn-magic 🦄
@kapa.ai will tailwind be able to resolve components in a nuxt layer and the app without using a resolver?
14 replies
NNuxt
Created by dmarr on 2/13/2025 in #❓・help
Build error after upgrading to 3.15.4 - No "exports" main defined ... unicorn-magic 🦄
@kapa.ai using @nuxt/kit createResolver in my tailwindConfig appears to cause the error
14 replies
NNuxt
Created by dmarr on 2/13/2025 in #❓・help
Build error after upgrading to 3.15.4 - No "exports" main defined ... unicorn-magic 🦄
I think i've narrowed the issue down to using @nuxt/kit createResolver in my tailwindConfig. Since i am authoring a layer, the content setting for tailwind should be relative to the layer directory.
14 replies
NNuxt
Created by dmarr on 2/7/2025 in #❓・help
Breaking app when awaiting composable in page setup
I have literally hit every wall on the way to productivity haha
14 replies
NNuxt
Created by dmarr on 2/7/2025 in #❓・help
Breaking app when awaiting composable in page setup
I guess this works
const req1 = useAsyncData('xyz', () => requestFetch('/api/echo'));
const req2 = useAsyncData('foo', () => requestFetch('/api/echo'));
const [data1, data2] = await Promise.all([req1, req2]);
const req1 = useAsyncData('xyz', () => requestFetch('/api/echo'));
const req2 = useAsyncData('foo', () => requestFetch('/api/echo'));
const [data1, data2] = await Promise.all([req1, req2]);
14 replies
NNuxt
Created by dmarr on 2/7/2025 in #❓・help
Breaking app when awaiting composable in page setup
Also this doesn't break, until I add the second useAsyncData..
const { data } = await useAsyncData('xyz', () => requestFetch('/api/echo'));
// const { data: foo } = await useAsyncData('foo', () => requestFetch('/api/echo'));
const { data } = await useAsyncData('xyz', () => requestFetch('/api/echo'));
// const { data: foo } = await useAsyncData('foo', () => requestFetch('/api/echo'));
14 replies
NNuxt
Created by dmarr on 2/7/2025 in #❓・help
Breaking app when awaiting composable in page setup
why wouldn't this work in a composable?
const { session } = useAuthSession();
const headers = useRequestHeaders(['cookie']);
session.value = await $fetch<AuthSession>('/api/auth/session', { headers });
const { session } = useAuthSession();
const headers = useRequestHeaders(['cookie']);
session.value = await $fetch<AuthSession>('/api/auth/session', { headers });
I'm not using useFetch
14 replies
NNuxt
Created by dmarr on 2/7/2025 in #❓・help
Breaking app when awaiting composable in page setup
I feel like for the amount of time I use nuxt, (all day, every day haha) this should have been more obvious to me. I haven't seen that part of the docs, and I scour the useFetch/custom fetch wrapper stuff pretty consistently. Maybe the error message lacks some information that could make troubleshooting easier. The page it links to currently links to a verbose github issue with details that are no longer relevant. Ie, before certain fixes were added you had to do certain things to workaround the issue. The reason it cropped up for me was due to the reasons you said, but those weren't shown in the error...
14 replies
NNuxt
Created by dmarr on 2/7/2025 in #❓・help
Breaking app when awaiting composable in page setup
ok.. thanks
14 replies
NNuxt
Created by NiceCraftz on 2/5/2025 in #❓・help
Authentication and Fetch Confusion
are you using BASE_URL by chance?
9 replies
NNuxt
Created by tb13 on 11/5/2024 in #❓・help
npx nuxi module add hub does not work
8 replies
NNuxt
Created by tb13 on 11/5/2024 in #❓・help
npx nuxi module add hub does not work
not sure if you ever figured this out, but you would likely need to use the custom proxy settings of ofetch. This is what $fetch is in nuxt. HTTP_PROXY appears to have no affect on how the fetching works.
8 replies
NNuxt
Created by Alejandro Mery on 2/2/2025 in #❓・help
path to dependency
The dep should be brought into whatever app is installing your module. Assuming your module has it as a normal dep and not a devdep
9 replies