1.Property or method "xxx" is not defined on the instance but referenced during render.

原因:xxx在template或方法中使用了,但是没有在data中定义

2.can not read property ‘xxx’ of undefined 和 can not read propery ‘xxx’ of null

原因:因为 调用这个xxx方法的对象 的数据类型是undefined,所以无法调用报错。类似的报错还有Cannot read property 'xxx' of null   调用方法的对象是null,也是无法调用报错

3.Error in render function: "Type error"

注意,只要出现Error in render,即渲染时候报错,此时应该去渲染位置去找错误,而不是函数里面。

4.Error: listen EADDRNOTAVAIL 192.168.3.83:3030

原因:地址或端口号错误
// host: '192.168.3.83', // can be overwritten by process.env.HOST
// port: 3030, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
改为host: '127.0.0.1', 
改为port: 8080
 

5.Computed property "xxx" was assigned to but it has no setter.

xxx 属性,如果没有设置 setter,也就是传入的是一个函数,或者传入的对象里没有 set 属性,当你尝试直接该改变这个这个计算属性的值,都会报这个错误。
例如:
<template>
<div id="app">
<div>{{number}}</div>
</div>
</template> <script>
export default {
computed:{
number(){
return 123
}
},
created(){
this.number=234; //this.number 是定义再computed的方法函数,不能直接使用修改属性的方式修改
}
}
</script>

6.Duplicate keys detected: '8'. This may cause an update error. 错误

主要时绑定的key出现了重复

看错误的的报告中关键字’keys’,联系错误的时机,可以知道这个错误出现在我使用vue的循环中,循环再vue或者小程序中饭为了保证每一项的独立性,都会推荐使用key,所以综上所述,很可能是key出现问题

 
 
 
很显然后几个的index重复了,所以修改index后,就不再出现此问题了。

7.[Vue warn]: Error in render: "TypeError: Cannot read property 'title' of null"

<template>
<section class="book-info" >
<div class="book-detail">
<h2 class="book-title">{{ book.title }}</h2>
</div>
</section>
</template> <script>
export default {
data(){
return{
book:null
}
},
created(){
http.getBook(this.currentBook.id)
.then(data=>{
this.book=data
console.log(data)
})
}
}
</script>

解决方法

方法1.设置 book类型由null改为Object

  data(){
return{
book:Object
}
},

方法2.设置v-if="book !== null"

<template>
<section class="book-info" v-if="book !== null">
<div class="book-detail">
<h2 class="book-title">{{ book.title }}</h2></p>
</div>
</section>
</template> <script>
export default {
data(){
return{
book:null
}
},
created(){
http.getBook(this.currentBook.id)
.then(data=>{
this.book=data
console.log(data)
})
}
}
</script> <style lang="scss" scoped> </style>

vue报错信息的更多相关文章

  1. vue报错There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these mod

    今天在开发一个新项目时,当安装完依赖包启动项目后报了一个这个错 There are multiple modules with names that only differ in casing.Thi ...

  2. Vue报错: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'protocol')

    Vue报错: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'protocol') 报错信 ...

  3. SVN Cornerstone 报错信息 xcodeproj cannot be opened because the project file cannot be parsed.

    svn点击update 之后,打开xcode工程文件,会出现  xxx..xcodeproj  cannot be opened becausethe project file cannot be p ...

  4. PHP安全编程:不要让不相关的人看到报错信息

    没有不会犯错的开发者,PHP的错误报告功 能可以协助你确认和定位这些错误,可以提供的这些错误的详细描述,但如果被恶意攻击者看到,这就不妙了.不能让大众看到报错信息,这一点很重要.做到这一 点很容易,只 ...

  5. SQL 报错信息整理及解决方案(持续更新)

    整理一下自己遇见过的 SQL 各种报错信息及相应解决方法,方便以后查阅,主要平台为 Oracle: ORA-01461: 仅能绑定要插入 LONG 列的 LONG 值: 原因:插入操作时,数据大于字段 ...

  6. JavaWeb:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

    建立了一个Javaweb工程,并在eclipse中配置了Web容器Tomcat.新建的jsp页面,添加一个简单的Java类.可是,JSP页面顶端出现“红色”的报错信息:The superclass & ...

  7. tomcat部署新的项目的时候出现报错信息: Invalid byte tag in constant pool: 15

    上面一堆tomcat启动的提示信息省略掉,下面是报错的具体信息:org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid ...

  8. PHP安全编程:不要让不相关的人看到报错信息(转)

    没有不会犯错的开发者,PHP的错误报告功能可以协助你确认和定位这些错误,可以提供的这些错误的详细描述,但如果被恶意攻击者看到,这就不妙了.不能让大众看到报错信息,这一点很重要.做到这一点很容易,只要关 ...

  9. JAVA_用_JCO连接_SAP,实现调用SAP_的_RFC_函数(整理)(附一篇看起来比较全面的说明)(JCO报错信息)

    // 获取RFC返回的字段值 11 JCoParameterList exportParam = function.getExportParameterList(); 12 String exPara ...

随机推荐

  1. JVM 之类加载

    一.概述 Java不同于C/C++这类传统的编译型语言,也不同于php这一类动态的脚本语言.可以说Java是一种半编译语言,我们所写的类会先被编译成.class文件,这个.class是一串二进制的字节 ...

  2. MyBatis笔记----MyBatis 入门经典的两个例子: XML 定义与注解定义

    ----致敬MyBatis官方开放文档让大家翻译,不用看书直接看文档就行了,mybatis的中文文档还需要完备的地方 简介 什么是 MyBatis ? MyBatis 是支持定制化 SQL.存储过程以 ...

  3. java国际化---native2ascii.exe 的使用方法

    从另一个博客迁移 native2ascii.exe使用方法: 命令的语法格式: native2ascii -[options] [inputfile [outputfile]] 说明: -[optio ...

  4. [20181204]低版本toad 9.6直连与ora-12505.txt

    [20181204]低版本toad 9.6直连与ora-12505.txt --//我们生产系统还保留有一台使用AMERICAN_AMERICA.US7ASCII字符集的数据库,这样由于toad新版本 ...

  5. [20181108]with temp as 建立临时表吗.txt

    [20181108]with temp as 建立临时表吗.txt --//链接:http://www.itpub.net/thread-2106304-1-1.html--//作者提到在dg上使用w ...

  6. SQL的日期转换

    日期转会计期 SUBSTRING(CONVERT(VARCHAR,getdate(), 20), 1, 7)   2015-06 SUBSTRING(CONVERT(VARCHAR,DATEADD(m ...

  7. UGUI Set Anchor And Pivot

    我的环境 Unity 5.3.7p4 在运行时动态的设置UI元素的锚点和中心点. 设置Anchor 修改offsetMax不生效 使用下面这段代码设置Anchor并不会生效,尽管他和你在属性面板看到的 ...

  8. CentOS7 vi编辑命令【转】

    CentOS 7 vi编辑命令 用vi打开一个yum文件 vi /usr/bin/yum 按 i 键后  进入insert模式,进入insert模式后才能进行修改 修改完成后 按esc键进入comma ...

  9. Python中可变和不可变类型

    可变类型 列表,字典,集合 不可变类型 数字,字符串,元组 这里的可变不可变,是指内存中的那块内容(value)是否可以被改变 不可变类型 数字 a = 1 b = 1 print(id(a), id ...

  10. 为JQuery EasyUI 表单组件加上“清除”功能

    1.背景 在使用 EasyUI 各表单组件时,尤其是使用 ComboBox(下拉列表框).DateBox(日期输入框).DateTimeBox(日期时间输入框)这三个组件时,经常有这样的需求,下拉框或 ...