Failed to load source map
Description
I'm not entirely sure if this is an error within nuxt, vite, radix-vue, or internationalized/date, but I wasn't able to find this same error anywhere else, so maybe it'll be useful.
When putting a shadcn-vue Button component inside the app.vue template there are more than 10 warnings as shown in the attachment presumably while the vite server is loading.
Reproduce:
Put a
<Button>
component in the app.vue template
Alternatively, this and a few other tests are set up in this stackblitz repo.
Solution (ish)
Only use the Button component (or components that use the Button component) in a page or layout rather than in app.vue.
Other notes
- radix-vue depends on internationalized/date, and shadcn-nuxt depends on radix-vue
- disabling source maps in nuxt config doesn't stop the warning from showing
- adding vite.build.sourcemap = false and vite.server.fs.strict = false didn't change anything either
- the warnings only show when running the dev server and not when building or in production
- the files do actually exist in the locations it says they don't
Hopefully this helps someone else, and if someone has an idea of where the error came from or what caused it so I can open a github issue there that'd be appreciated.StackBlitz
Source map error reproducable - StackBlitz
Create a new Nuxt project, module, layer or start from a theme with our collection of starters.
0 Replies