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. [20190101]块内重整.txt

    [20190101]块内重整.txt --//我不知道用什么术语表达这样的情况,我仅仅一次开会对方这么讲,我现在也照用这个术语.--//当dml插入数据到数据块时,预留一定的空间(pctfree的百分 ...

  2. [20181031]12c 在线移动数据文件.txt

    [20181031]12c 在线移动数据文件.txt --//12c以前,移动或者改名数据文件是一项比较麻烦的事情,至少要停一下业务.而12c支持在线移动或者改名数据文件,并且有点不可思议--//的是 ...

  3. shell编程—注释、字符串和数组(四)

    shell注释 以#作为注释符号 shell中没有多行注释,只能一行加一个#号 字符串操作 1.拼接字符串 2.获取字符串长度 string=“khjf” echo ${#string} 3.提取子字 ...

  4. 网络互联技术(2)——前篇—【转载】电脑结构和CPU、内存、硬盘三者之间的关系

    原文链接:传送门 详细内容: 电脑结构和CPU.内存.硬盘三者之间的关系 前面提到了,电脑之父——冯·诺伊曼提出了计算机的五大部件:输入设备.输出设备.存储器.运算器和控制器. 我们看一下现在我们电脑 ...

  5. Python 中if __name__ == '__main__': 的作用和原理

    转自https://blog.csdn.net/weixin_42660771/article/details/84035153 1.代码的功能 一个python的文件有两种使用的方法,第一是直接作为 ...

  6. Java中 try--catch-- finally、throw、throws 的用法

    一.try {..} catch {..}finally {..}用法 try { 执行的代码,其中可能有异常.一旦发现异常,则立即跳到catch执行.否则不会执行catch里面的内容 } catch ...

  7. CMM/CMMI的基本概念

    "CMM是指“能力成熟度模型”,其英文全称为Capability Maturity Model for Software,英文缩写为SW-CMM,简称CMM. 它是对于软件组织在定义.实施. ...

  8. Windows Server 2016-域站点链接及复制时间调整

    本章简单为大家介绍如何新建域链接并调整复制计划.生产环境中很多情况下需要我们手工去创建站点复制链接,并根据实际带宽情况调整复制计划以减轻网络压力等.站点内部署多台域控制器,域控制器间的 复制链接建议通 ...

  9. 安装Jenkins getting started卡住

    前言 jenkins版本:2.32.3 操作系统:windows 卡住信息 如果在安装jenkins时卡在getting startted的界面,如下所示 解决方法 1.打开 运行  输入 servi ...

  10. linux (fedora 28) 制作启动U盘,启动盘

    最近需要安装一款Linux, 由于使用的计算机系统为 fedora 28, 所以只能在linux 制作U盘 使用 df 或者 fdisk -l 查看 U盘文件: Disk /dev/sdb: byte ...