{"record":{"id":"3c141734998d4ef4","repo":"Meituan-Dianping/mpvue","slug":"do-not-use-built-in-or-reserved-html-elements-as-c-3c1417","errorCode":null,"errorMessage":"Do not use built-in or reserved HTML elements as component id: ${key}","messagePattern":"Do not use built-in or reserved HTML elements as component id: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/util/options.js","lineNumber":229,"sourceCode":"strats.provide = mergeDataOrFn\n\n/**\n * Default strategy.\n */\nconst defaultStrat = function (parentVal: any, childVal: any): any {\n  return childVal === undefined\n    ? parentVal\n    : childVal\n}\n\n/**\n * Validate component names\n */\nfunction checkComponents (options: Object) {\n  for (const key in options.components) {\n    const lower = key.toLowerCase()\n    if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\n      warn(\n        'Do not use built-in or reserved HTML elements as component ' +\n        'id: ' + key\n      )\n    }\n  }\n}\n\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","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/core/util/options.js#L211-L247","documentation":"Emitted by checkComponents (a dev-only pass over options.components during option merging) when a locally registered component's id, lowercased, matches either isBuiltInTag (slot, component) or a platform reserved tag (config.isReservedTag — standard HTML elements like 'header', 'div', 'select'). Registering under such a name would make templates like <header> ambiguous between the native element and the custom component, so the name is rejected.","triggerScenarios":"Thrown at src/core/util/options.js:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Prefix the component id, e.g. register as 'my-header' or 'AppHeader' instead of 'header'","Choose a name that is not an HTML element, <slot> or <component>","If you intended to style/extend a native element, keep the native tag and apply classes or directives instead"],"exampleFix":null,"handlingStrategy":"validation","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"}