dmarr
dmarr
NNuxt
Created by dmarr on 6/3/2025 in #❓・help
Adding css programatically via a module
Woohoo
6 replies
NNuxt
Created by dmarr on 6/1/2025 in #❓・help
Building vitepress and a nuxt playground
@kapa.ai how would i copy the contents of .output/public to the /temp directtory of vitepress output
9 replies
NNuxt
Created by dmarr on 5/23/2025 in #❓・help
Types added via module
ok for layers it seems i can just add index.d.ts to the root and it will be added
6 replies
NNuxt
Created by Furkan 'NaxoziwuS' on 9/4/2024 in #❓・help
Localhost:4000/ws WebSocket Connection Error
I had some luck playing around with this https://github.com/vi/websocat basically you can connect to it from your browser or your backend, and maybe have an easier time troubleshooting
3 replies
NNuxt
Created by dmarr on 4/18/2025 in #❓・help
Is there an idiomatic way to disable a module?
Thanks Mole, I was curious about the hooks that are declared with the object syntax (alongside the setup function). It seems those would always run as the config isn’t available from what I can tell.
7 replies
NNuxt
Created by Phillip on 2/11/2025 in #❓・help
Getting weird errors recently when starting Nuxt
Ended up deleting the vite cache, and reinstalling and it seems to have fixed the issue.
13 replies
NNuxt
Created by Phillip on 2/11/2025 in #❓・help
Getting weird errors recently when starting Nuxt
I'm getting this error as well.
13 replies
NNuxt
Created by dmarr on 3/26/2025 in #❓・help
Module that uses fetch
@kapa.ai is there a way to know when you are in a build script vs dev server inside a module?
14 replies
NNuxt
Created by dmarr on 3/26/2025 in #❓・help
Module that uses fetch
@kapa.ai how would I access runtime env in my module that is set from the envinronment? When I use the ready hook, the values I set with my .env file don't appear to be loaded yet.
14 replies
NNuxt
Created by dmarr on 3/19/2025 in #❓・help
Mocking auto-imported server utils in tests
@kapa.ai no luck 😦 I feel like this is a quick answer, but I always get hung up finding support
14 replies
NNuxt
Created by dmarr on 3/19/2025 in #❓・help
Mocking auto-imported server utils in tests
@kapa.ai Error: Cannot find import "dbQuery" to mock
14 replies
NNuxt
Created by dmarr on 3/19/2025 in #❓・help
Mocking auto-imported server utils in tests
I believe since it's a server based autoimport, this will not work. The error I get is: Error: Cannot find import "dbQuery" to mock
14 replies
NNuxt
Created by dmarr on 3/11/2025 in #❓・help
Is it possible to remove a plugin inherited from a layer via module?
No, I ended up working around it
6 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
Bummer man. It should have been as easy as pulling down my repo and running dev
35 replies
NNuxt
Created by dmarr on 3/11/2025 in #❓・help
mocking useI18n with nuxt i18n module
Also on the docs for mockNuxtImport: https://nuxt.com/docs/getting-started/testing#mocknuxtimport The suggestion:
import { vi } from 'vitest'
import { mockNuxtImport } from '@nuxt/test-utils/runtime'

const { useStorageMock } = vi.hoisted(() => {
return {
useStorageMock: vi.fn(() => {
return { value: 'mocked storage'}
})
}
})

mockNuxtImport('useStorage', () => {
return useStorageMock
})

// Then, inside a test
useStorageMock.mockImplementation(() => {
return { value: 'something else' }
})
import { vi } from 'vitest'
import { mockNuxtImport } from '@nuxt/test-utils/runtime'

const { useStorageMock } = vi.hoisted(() => {
return {
useStorageMock: vi.fn(() => {
return { value: 'mocked storage'}
})
}
})

mockNuxtImport('useStorage', () => {
return useStorageMock
})

// Then, inside a test
useStorageMock.mockImplementation(() => {
return { value: 'something else' }
})
if i wanted to pu those parts in the vitest global setup, how would I get access to useStorageMock?
6 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
That link to my repo might actually work
35 replies
NNuxt
Created by dmarr on 3/10/2025 in #❓・help
Can tailwind prefix be set on a per-layer basis?
@kapa.ai when I try to run my app, I get the following error: [11:15:34 AM] ERROR Pre-transform error: [postcss] /app/node_modules/nuxt--app/src/assets/css/tailwind.css:1:1: The tw-border-border class does not exist. If tw-border-border is a custom class, make sure it is defined within a @layer directive. Plugin: vite:css File: /app/node_modules/nuxt-layer/src/assets/css/tailwind.css:1:0 1 | @tailwind base; | ^ 2 | @tailwind components; 3 | @tailwind utilities;
6 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
you only need the google one if thats what you require
35 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
NUXT_PUBLIC_MAP_TILER_KEY=
NUXT_PUBLIC_GOOGLE_MAP_TILES_API_KEY=
NUXT_PUBLIC_MAP_TILER_KEY=
NUXT_PUBLIC_GOOGLE_MAP_TILES_API_KEY=
35 replies