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. CsQuery中文编码乱码问题

    一.问题描述 InnerHTML 中文显示为Модель 二.解决方法 在初始化CQ对象前,先设置执行以下语句: CsQuery.Config.HtmlEncoder = CsQuery.HtmlEn ...

  2. ERP主副机和打印机配置FAQ

    一.主副机 1. ERP主副机配置 先配置主机 再配置副机 在主机的电脑上键盘按win+R键,输入cmd 再输入ipconfig查看主机的IP 然后在副机上安装银盒子ERP,在红框位置输入主机IP 选 ...

  3. 简易付XP版本无法获取server.xml配置文件处理方案

    博客地址:https://blog.csdn.net/zdw_wym/article/details/40892535 把它添加到C:/WINDOWS/Microsoft.NET/Framework/ ...

  4. java防止double和float精度丢失的方法

    在浮点数当中做运算时经常会出现精度丢失的情况,如果做项目不作处理的话会对商家造成很大的影响的.项目尤其是金融相关的项目对这些运算的精度要求较高. 问题原因:首先计算机进行的是二进制运算,我们输入的十进 ...

  5. ElementUI在IE11下兼容性修改

    1.在项目里面使用了axios.js来发送http请求,在IE下报错Promise未定义,解决办法: 到http://bluebirdjs.com/docs/getting-started.html  ...

  6. 回调函数的原理及PHP实例

    背景:在最近的一个开发项目中,用户要先调用服务才能开始进行一系列的查询活动,想了好久,经同事提醒, 用回调函数即可解决该问题.在这里,对PHP下回调函数的原理及实现分别做一下讲解. 1 什么是回调 软 ...

  7. php学习----什么是常量

    PHP-什么是常量 1.什么是常量?常量可以理解为值不变的量(如圆周率):或者是常量值被定义后,在脚本的其他任何地方都不可以被改变.PHP中的常量分为自定义常量和系统常量(后续小节会详细介绍). 2. ...

  8. LeetCode算法题-Contains Duplicate(Java实现)

    这是悦乐书的第192次更新,第196篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第52题(顺位题号是217).给定一个整数数组,查找数组是否包含任何重复项.如果数组中至 ...

  9. 【算法】LeetCode算法题-Remove Duplicates from Sorted Array

    这是悦乐书的第149次更新,第151篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第8题(顺位题号是26).给定一个已经排序(由小到大)的整数数组(元素可以重复),计算其 ...

  10. (转)Spring Boot(十八):使用 Spring Boot 集成 FastDFS

    http://www.ityouknow.com/springboot/2018/01/16/spring-boot-fastdfs.html 上篇文章介绍了如何使用 Spring Boot 上传文件 ...