Failed to resolve component 🟩 Vue

Vue: [Vue warn]: Failed to resolve component: x

The template uses a component tag that isn’t registered or imported where it’s used.

Seen on: Vue

Meaning

In Vue 3, components must be imported in <script setup> (or registered locally/globally). Name casing, missing auto-import config, or custom elements not declared also cause it.

Common causes

  • Component not imported in <script setup>
  • Typo/casing in the tag name
  • Global registration missing (app.component)
  • Web component not configured as custom element

⚡ Quick fix

  1. Import the component in the SFC
  2. Check the file/tag name
  3. Configure compilerOptions.isCustomElement for web components

Detailed fix by platform

Vue

  1. javascript
    <script setup>
    import UserCard from "@/components/UserCard.vue";
    </script>
    <template><UserCard :user="user" /></template>

How to diagnose

  1. Import — Present?
  2. Name — Matches tag?
  3. Nuxt — Auto-import directory?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.