{"record":{"id":"7dbb87df3a529ee5","repo":"Meituan-Dianping/mpvue","slug":"render-function-or-template-not-defined-in-compone","errorCode":null,"errorMessage":"render function or template not defined in component: ${\n          vm.$options.name || vm.$options._componentTag || 'anonymous'\n        }","messagePattern":"render function or template not defined in component: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/server/render.js","lineNumber":36,"sourceCode":"} from 'core/vdom/create-component'\n\nlet warned = Object.create(null)\nconst warnOnce = msg => {\n  if (!warned[msg]) {\n    warned[msg] = true\n    console.warn(`\\n\\u001b[31m${msg}\\u001b[39m\\n`)\n  }\n}\n\nconst normalizeRender = vm => {\n  const { render, template, _scopeId } = vm.$options\n  if (isUndef(render)) {\n    if (template) {\n      Object.assign(vm.$options, ssrCompileToFunctions(template, {\n        scopeId: _scopeId\n      }))\n    } else {\n      throw new Error(\n        `render function or template not defined in component: ${\n          vm.$options.name || vm.$options._componentTag || 'anonymous'\n        }`\n      )\n    }\n  }\n}\n\nfunction renderNode (node, isRoot, context) {\n  if (node.isString) {\n    renderStringNode(node, context)\n  } else if (isDef(node.componentOptions)) {\n    renderComponent(node, isRoot, context)\n  } else if (isDef(node.tag)) {\n    renderElement(node, isRoot, context)\n  } else if (isTrue(node.isComment)) {\n    if (isDef(node.asyncFactory)) {\n      // async component","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/server/render.js#L18-L54","documentation":"Thrown by normalizeRender during SSR when a component instance reaching the server renderer has neither a compiled render function nor a template in its $options. It fires when a component was written without a render option and its template could not be precompiled at build time (e.g. vue-loader excluded the file, the component is defined via an object missing template/render, or runtime-only Vue is used where in-browser template compilation is unavailable).","triggerScenarios":"Thrown at src/server/render.js:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a render function or a template to the component definition","Ensure vue-loader processes the file so the template is compiled at build time","If using runtime-only Vue, precompile all templates via SFCs or render functions","Check the component name printed in the message to locate the offending component"],"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"}