直接跳到内容

生产环境错误代码参考

运行时错误

在生产环境中,传递给以下错误处理程序 API 的第三个参数是一个短代码,而不是含有完整信息的字符串:

下表提供了代码和其原始的完整信息字符串的映射。

错误码信息
0setup function
1render function
2watcher getter
3watcher callback
4watcher cleanup function
5native event handler
6component event handler
7vnode hook
8directive hook
9transition hook
10app errorHandler
11app warnHandler
12ref function
13async component loader
14scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .
spserverPrefetch hook
bcbeforeCreate hook
ccreated hook
bmbeforeMount hook
mmounted hook
bubeforeUpdate hook
uupdated
bumbeforeUnmount hook
umunmounted hook
aactivated hook
dadeactivated hook
ecerrorCaptured hook
rtcrenderTracked hook
rtgrenderTriggered hook

编译错误

下表提供了生产环境的编译错误代码与其原始消息的映射。

错误码信息
0Illegal comment.
1CDATA section is allowed only in XML context.
2Duplicate attribute.
3End tag cannot have attributes.
4Illegal '/' in tags.
5Unexpected EOF in tag.
6Unexpected EOF in CDATA section.
7Unexpected EOF in comment.
8Unexpected EOF in script.
9Unexpected EOF in tag.
10Incorrectly closed comment.
11Incorrectly opened comment.
12Illegal tag name. Use '&lt;' to print '<'.
13Attribute value was expected.
14End tag name was expected.
15Whitespace was expected.
16Unexpected '<!--' in comment.
17Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).
18Unquoted attribute value cannot contain U+0022 ("), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).
19Attribute name cannot start with '='.
20Unexpected null character.
21'<?' is allowed only in XML context.
22Illegal '/' in tags.
23Invalid end tag.
24Element is missing end tag.
25Interpolation end sign was not found.
26Legal directive name was expected.
27End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.
28v-if/v-else-if is missing expression.
29v-if/else branches must use unique keys.
30v-else/v-else-if has no adjacent v-if or v-else-if.
31v-for is missing expression.
32v-for has invalid expression.
33<template v-for> key should be placed on the <template> tag.
34v-bind is missing expression.
35v-on is missing expression.
36Unexpected custom directive on <slot> outlet.
37Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.
38Duplicate slot names found.
39Extraneous children found when component already has explicitly named default slot. These children will be ignored.
40v-slot can only be used on components or <template> tags.
41v-model is missing expression.
42v-model value must be a valid JavaScript member expression.
43v-model cannot be used on v-for or v-slot scope variables because they are not writable.
44v-model cannot be used on a prop, because local prop bindings are not writable. Use a v-bind binding combined with a v-on listener that emits update:x event instead.
45Error parsing JavaScript expression:
46<KeepAlive> expects exactly one child component.
47"prefixIdentifiers" option is not supported in this build of compiler.
48ES module mode is not supported in this build of compiler.
49"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.
50"scopeId" option is only supported in module mode.
51@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.
52v-bind with same-name shorthand only allows static argument.
53v-html is missing expression.
54v-html will override element children.
55v-text is missing expression.
56v-text will override element children.
57v-model can only be used on <input>, <textarea> and <select> elements.
58v-model argument is not supported on plain elements.
59v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.
60Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.
61v-show is missing expression.
62<Transition> expects exactly one child element or component.
63Tags with side effect (<script> and <style>) are ignored in client component templates.
生产环境错误代码参考已经加载完毕