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.
[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 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
<Cmp :count="5" />(v-bind)- Allow multiple types:
type: [Number, String] - Convert data before passing
Detailed fix by platform
Vue
defineProps<{ count: number }>()
How to diagnose
- Binding — : or static?
- Type — Declared?
- 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:
Similar errors
- [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 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 warn]: injection "x" not found Vue: [Vue warn]: injection "theme" not found.
Most viewed in Vue
- Property was accessed during render but is not defined Vue: [Vue warn]: Property "x" was accessed during render but is not defined on instance
- Failed to resolve component Vue: [Vue warn]: Failed to resolve component: x
- Nuxt: window/document/localStorage is not defined (SSR) Nuxt: ReferenceError: window is not defined / 500 Internal Server Error during SSR
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 5 Nov 2026