I’m using Nuxt 4 with [email protected], and I’m getting warnings for every shadcn-vue component:
WARN Overriding StepperDescription component. You can specify a priority option when calling addComponent to avoid this warning.
WARN Overriding Table component. You can specify a priority option when calling addComponent to avoid this warning.
WARN Overriding Switch component. You can specify a priority option when calling addComponent to avoid this warning.
... (and so on for all components)
---
How can I properly remove or silence these “Overriding component” warnings in a Nuxt 4 project using shadcn-nuxt?
My Nuxt 4 config:
// https://nuxt.com/docs/api/configuration/nuxt-config
import tailwind from '@tailwindcss/vite';
export default defineNuxtConfig({
devtools: { enabled: true },
compatibilityDate: '2025-07-15',
modules: [
'@nuxt/eslint',
'@nuxt/fonts',
'shadcn-nuxt',
'@vueuse/nuxt',
'@nuxtjs/color-mode',
],
colorMode: {
preference: 'system',
fallback: 'light',
hid: 'nuxt-color-mode-script',
globalName: '__NUXT_COLOR_MODE__',
componentName: 'ColorScheme',
classPrefix: '',
classSuffix: '',
storage: 'localStorage',
storageKey: 'nuxt-color-mode',
},
css: ['~/assets/css/main.css'],
vite: {
plugins: [tailwind()],
},
eslint: {
config: {
formatters: {
html: 'prettier',
},
},
},
shadcn: {
/**
* Prefix for all the imported component
*/
prefix: '',
/**
* Directory that the component lives in.
* @default "./components/ui"
*/
componentDir: '~/components/ui',
},
alias: {
'@components': '~/components',
'@ui': '~/components/ui',
'@utils': '~/lib/utils',
},
});
I also added this to my nuxt.config, but it doesn't resolve the warnings.
...
components: [
{
path: '~/components/ui',
extensions: ['.vue', '.ts'],
},
],
...
What should I do?
