[Vue warn]: Component is missing template or render function Vue Origin: On your device OSI layer 7 · Application Last updated 5 Nov 2026

Vue: [Vue warn]: Component is missing template or render function.

A component object has neither template nor render, or an SFC import resolved wrongly.

Exact message you may see [Vue warn]: Component is missing template or render function.Component is missing template or render function[Vue warn]: Component is missing template or render function: Module {}Vue component missing template or render function
Seen on: Vue

Meaning

Typical causes: importing a .vue file without the Vue plugin/loader, importing the wrong thing (a module namespace or defineComponent result missing template), template string with the runtime-only build, or forgetting export default. Check import X from './X.vue' returns a component.

Common causes

  • SFC not compiled (plugin/loader missing)
  • Importing the namespace/wrong export
  • Runtime-only build with template: strings
  • Empty component definition
  • Async component resolving to a module object

⚡ Quick fix

  1. Install/configure @vitejs/plugin-vue/vue-loader
  2. import X from "./X.vue" (default)
  3. Use a build with the compiler or render functions

Detailed fix by platform

Vue

  1. javascript
    // vite.config.ts
    import vue from "@vitejs/plugin-vue"; export default { plugins: [vue()] };

How to diagnose

  1. Plugin — Configured?
  2. Import — Default component?
  3. Build — Compiler?

🔧 Still not fixed?

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

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

[Vue warn]: Slot "default" invoked outside of the render function — Vue: [Vue warn]: Slot "default" invoked outside of the render function: this will not track dependencies used in the slot (Vue)[Vue warn]: Slot "def…Component provided template option but runtime compilation is not supported — Vue: [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js" (Vue)Component provided te…Could not find a production build in the '.next' directory — Next.js: Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server (Next.js)Could not find a prod…ELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLEERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPPOR…ESLint Parsing error in .vue files — ESLint: Parsing error: Unexpected token < / Parsing error: '>' expected (vue-eslint-parser not configured) (Vue)ESLint Parsing error …Failed to compile: ESLint errors during next build — Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars (Next.js)Failed to compile: ES…Failed to fetch font from Google Fonts — Next.js: ⨯ Failed to download `Inter` from Google Fonts. Using fallback font instead / FetchError: request to https://fonts.googleapis.com failed (Next.js)Failed to fetch font …[Vue warn…

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.