dmarr
dmarr
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
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
you will need a .env in playground with keys.
35 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
35 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
any luck?
35 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
35 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
https://github.com/Gugustinette/nuxt-maplibre clone that because using it as a module doesn’t actually work
35 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
Yea
35 replies
NNuxt
Created by Hugo on 3/9/2025 in #❓・help
Add google map with nuxt
I can help you with this in a bit. Maplibre-vue-plugin with maplibre-google-maps is how I did it
35 replies
NNuxt
Created by David on 2/1/2025 in #❓・help
Two component files resolving to the same name `UiLabel`
You should be able to remove that components setting in your nuxt configuration. You will need a shadcn config in your nuxt config that points to app/components/ui or wherever
18 replies