Meituan-Dianping/mpvue · error

Duplicate presence of slot "${name}" found in the same rende

Error message

Duplicate presence of slot "${name}" found in the same render tree - this will likely cause render errors.

What it means

Emitted by the renderSlot runtime helper when it is asked to render a named slot whose vnode array carries the internal _rendered flag — meaning that same slot's vnodes were already returned earlier in this render pass. The identical vnode array cannot appear at two places in one render tree (vnodes have a single parent linkage), so the duplicate usage will produce patch errors or a blank/duplicated region. Typical cause: the same <slot name="x"> rendered in two branches or the slot referenced twice in one component template.

Source

Thrown at src/core/instance/render-helpers/render-slot.js:25

 */
export function renderSlot (
  name: string,
  fallback: ?Array<VNode>,
  props: ?Object,
  bindObject: ?Object
): ?Array<VNode> {
  const scopedSlotFn = this.$scopedSlots[name]
  if (scopedSlotFn) { // scoped slot
    props = props || {}
    if (bindObject) {
      props = extend(extend({}, bindObject), props)
    }
    return scopedSlotFn(props) || fallback
  } else {
    const slotNodes = this.$slots[name]
    // warn duplicate slot usage
    if (slotNodes && process.env.NODE_ENV !== 'production') {
      slotNodes._rendered && warn(
        `Duplicate presence of slot "${name}" found in the same render tree ` +
        `- this will likely cause render errors.`,
        this
      )
      slotNodes._rendered = true
    }
    return slotNodes || fallback
  }
}

View on GitHub (pinned to 6c5d78ee04)

Solutions

  1. Render the named slot in only one place within the component's template
  2. If you need its content in two spots, wrap it in a functional wrapper or clone the vnodes instead of reusing the same slot
  3. Check v-if/v-else branches and loops that both contain the same named slot
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/core/instance/render-helpers/render-slot.js:25 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/e1a47381fd3887e2. Report an issue: GitHub.