{"record":{"id":"769ccb738d13017c","repo":"Meituan-Dianping/mpvue","slug":"error-compiling-template-n-n-template-n-n-comp","errorCode":null,"errorMessage":"Error compiling template:\\n\\n${template}\\n\\n${compiled.errors.map(e => `- ${e}`).join('\\n')}\\n","messagePattern":"Error compiling template:\\\\n\\\\n(.+?)\\\\n\\\\n(.+?)`\\)\\.join\\('\\\\n'\\)\\}\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/compiler/to-function.js","lineNumber":64,"sourceCode":"        }\n      }\n    }\n\n    // check cache\n    const key = options.delimiters\n      ? String(options.delimiters) + template\n      : template\n    if (cache[key]) {\n      return cache[key]\n    }\n\n    // compile\n    const compiled = compile(template, options)\n\n    // check compilation errors/tips\n    if (process.env.NODE_ENV !== 'production') {\n      if (compiled.errors && compiled.errors.length) {\n        warn(\n          `Error compiling template:\\n\\n${template}\\n\\n` +\n          compiled.errors.map(e => `- ${e}`).join('\\n') + '\\n',\n          vm\n        )\n      }\n      if (compiled.tips && compiled.tips.length) {\n        compiled.tips.forEach(msg => tip(msg, vm))\n      }\n    }\n\n    // turn code into functions\n    const res = {}\n    const fnGenErrors = []\n    res.render = createFunction(compiled.render, fnGenErrors)\n    res.staticRenderFns = compiled.staticRenderFns.map(code => {\n      return createFunction(code, fnGenErrors)\n    })\n","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/compiler/to-function.js#L46-L82","documentation":"Dev-mode warning from compileToFunctions in to-function.js: the runtime template compiler ran compile() on the template string and collected errors in compiled.errors. Vue logs the whole template plus an itemized error list; the resulting render function may be broken or missing, so this marks a template syntax/semantic failure at compile time, not runtime.","triggerScenarios":"Thrown at src/compiler/to-function.js:64 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the template syntax errors listed after the template in the warning","If the template comes from the DOM, check casing/closing-tag mangling by the HTML parser","Move the component to an SFC with vue-loader to compile at build time where errors surface earlier"],"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"}