Meituan-Dianping/mpvue · error
You are using the runtime-only build of Vue where the templa
Error message
You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
What it means
Error "You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build." thrown in Meituan-Dianping/mpvue.
Source
Thrown at src/core/instance/lifecycle.js:151
if (vm.$el) {
vm.$el.__vue__ = null
}
}
}
export function mountComponent (
vm: Component,
el: ?Element,
hydrating?: boolean
): Component {
vm.$el = el
if (!vm.$options.render) {
vm.$options.render = createEmptyVNode
if (process.env.NODE_ENV !== 'production') {
/* istanbul ignore if */
if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
vm.$options.el || el) {
warn(
'You are using the runtime-only build of Vue where the template ' +
'compiler is not available. Either pre-compile the templates into ' +
'render functions, or use the compiler-included build.',
vm
)
} else {
warn(
'Failed to mount component: template or render function not defined.',
vm
)
}
}
}
callHook(vm, 'beforeMount')
let updateComponent
/* istanbul ignore if */
if (process.env.NODE_ENV !== 'production' && config.performance && mark) {View on GitHub (pinned to 6c5d78ee04)
Solutions
- Pre-compile templates at build time with vue-loader/vueify so render functions ship instead of template strings
- Switch to the full compiler-included build (e.g. vue.js instead of vue.runtime.js) via bundler aliases or CDN path
- If using in-DOM templates or string template options, move them into pre-compiled single-file components or render functions
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at src/core/instance/lifecycle.js:151 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Meituan-Dianping/mpvue@6c5d78ee04 (2026-09-02).
Data as JSON: /api/errors/2e4c709475aeda81.
Report an issue: GitHub.