{"record":{"id":"639de51fdea3a580","repo":"Meituan-Dianping/mpvue","slug":"props-must-be-strings-when-using-array-syntax","errorCode":null,"errorMessage":"props must be strings when using array syntax.","messagePattern":"props must be strings when using array syntax\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/util/options.js","lineNumber":254,"sourceCode":"\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options: Object) {\n  const props = options.props\n  if (!props) return\n  const res = {}\n  let i, val, name\n  if (Array.isArray(props)) {\n    i = props.length\n    while (i--) {\n      val = props[i]\n      if (typeof val === 'string') {\n        name = camelize(val)\n        res[name] = { type: null }\n      } else if (process.env.NODE_ENV !== 'production') {\n        warn('props must be strings when using array syntax.')\n      }\n    }\n  } else if (isPlainObject(props)) {\n    for (const key in props) {\n      val = props[key]\n      name = camelize(key)\n      res[name] = isPlainObject(val)\n        ? val\n        : { type: val }\n    }\n  }\n  options.props = res\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options: Object) {","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/core/util/options.js#L236-L272","documentation":"Raised in normalizeProps while converting the props option to the canonical object format: the option is an array (the shorthand syntax props: ['foo', 'bar']) but one of its entries is not a string (a number, object, null, etc.). Only string entries can be camelized into prop names; the offending entry is skipped, so the resulting component silently lacks that prop.","triggerScenarios":"Thrown at src/core/util/options.js:254 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make every array entry a string: props: ['title', 'isVisible']","For props needing types/defaults, use object syntax: props: { title: String, count: { type: Number, default: 0 } }","Check for accidental non-string values from spreads, computed keys, or copy-paste into the array"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b","analyzedAt":"2026-09-02T05:17:40.946Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}