Meituan-Dianping/mpvue · error

v-on without argument does not support modifiers.

Error message

v-on without argument does not support modifiers.

What it means

Dev-only compiler check in the v-on directive handler: a v-on directive was written without an event argument (e.g. v-on="handlers") while carrying modifiers. The object-syntax form binds a handler map and has no single event to which modifiers (.stop, .prevent) could apply, so modifiers are meaningless and rejected.

Source

Thrown at src/compiler/directives/on.js:7

/* @flow */

import { warn } from 'core/util/index'

export default function on (el: ASTElement, dir: ASTDirective) {
  if (process.env.NODE_ENV !== 'production' && dir.modifiers) {
    warn(`v-on without argument does not support modifiers.`)
  }
  el.wrapListeners = (code: string) => `_g(${code},${dir.value})`
}

View on GitHub (pinned to 6c5d78ee04)

Solutions

  1. Remove the modifiers from the argument-less v-on
  2. Use v-on:event.modifier syntax if you need modifiers, applying them per event
  3. Handle preventDefault/stopPropagation manually inside the handler object's functions
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/compiler/directives/on.js:7 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/a0a612a7c9e42868. Report an issue: GitHub.