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?
I got similar warnings about components "priority" & "resolving same names".
Right now I got those warnings removed by these steps:
Removed node_modules, .nuxt and .output from your project
rm -rf node_modules .nuxt .output
Updated version of shadcn_nuxt inside package.json to this URL: https://pkg.pr.new/shadcn-nuxt@1418
// example
"shadcn-nuxt": "https://pkg.pr.new/shadcn-nuxt@1418"
Reinstalled dependencies via npm install
npm install        # `yarn install`, `pnpm install`, `yarn install`, or `bun install`
Prepare Nuxt again
# npm
npx nuxi prepare
# yarn
yarn nuxi prepare
# pnpm
pnpm exec nuxi prepare
# bun
bunx --bun nuxi prepare
Done!
Thanks and sorry in advance if It could not remove those warnings from your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With