[Vue warn]: Invalid prop: type check failed Vue Origin: On your device OSI layer 7 · Application Last updated 5 Nov 2026

Vue: [Vue warn]: Invalid prop: type check failed for prop "count". Expected Number with value 5, got String with value "5"

A prop received a value of the wrong type.

Exact message you may see [Vue warn]: Invalid prop: type check failed for prop "count". Expected Number with value 5, got String with value "5"Invalid prop: type check failed for prop[Vue warn]: Invalid prop: type check failed for prop "user". Expected Object, got NullInvalid prop: custom validator check failed for prop
Seen on: Vue

Meaning

Pass the right type: use :count="5" (bound) instead of count="5" (string). Update the prop definition or convert values. For several types use [String, Number]. Validators and required are separate warnings.

Common causes

  • Static attribute passes a string (count="5")
  • API data type differs
  • Prop declared with wrong type
  • null/undefined for a typed prop
  • Boolean casting with empty attr

⚡ Quick fix

  1. <Cmp :count="5" /> (v-bind)
  2. Allow multiple types: type: [Number, String]
  3. Convert data before passing

Detailed fix by platform

Vue

  1. defineProps<{ count: number }>()

How to diagnose

  1. Binding — : or static?
  2. Type — Declared?
  3. Data — Converted?

🔧 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]: Component emitted event but it is neither declared in the emits option nor as an onXxx prop — Vue: [Vue warn]: Component emitted event "update" but it is neither declared in the emits option nor as an "onUpdate" prop (Vue)[Vue warn]: Component…[Vue warn]: Extraneous non-props attributes — Vue: [Vue warn]: Extraneous non-props attributes (class) were passed to component but could not be automatically inherited because component renders fragment or text root nodes (Vue)[Vue warn]: Extraneou…[Vue warn]: injection "x" not found — Vue: [Vue warn]: injection "theme" not found. (Vue)[Vue warn]: injection…[Vue warn]: Missing required prop — Vue: [Vue warn]: Missing required prop: "title" (Vue)[Vue warn]: Missing r…[Vue warn]: Set operation on key failed: target is readonly — Vue: [Vue warn]: Set operation on key "name" failed: target is readonly. (Vue)[Vue warn]: Set opera…[Vue warn]: The computed property "x" is already defined in data/props — Vue: [Vue warn]: The computed property "name" is already defined in data. (Vue)[Vue warn]: The compu…Avoid mutating a prop directly — Vue: [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders (Vue)Avoid mutating a prop…Failed prop type: The prop href expects a string or object in <Link> — Next.js: Error: Failed prop type: The prop `href` expects a `string` or `object` in `<Link>`, but got `undefined` instead (Next.js)Failed prop type: The…[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.