解决关于:TypeError: Class constructor Model cannot be invoked without 'new'
问题描述:在工作过程中出现 TypeError: Class constructor Model cannot be invoked without 'new' 这个错误
以下是报错代码:
class Users extends father{
constructor(data){
super(data);
}
····
}
版本信息
npm 5.0.3
node 8.9.0
错误原因:
es版本为 es2015 es5
解决方案:
打开 tsconfig.json文件
将es5 es2015 替换为es6 重新编译
此随笔乃本人学习工作记录,如有疑问欢迎在下面评论,转载请标明出处。
如果对您有帮助请动动鼠标右下方给我来个赞,您的支持是我最大的动力。
解决关于:TypeError: Class constructor Model cannot be invoked without 'new'的更多相关文章
- Appium 1.9.1 启动报错 Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new'
安装了appium 1.9.1后一直报错Fatal TypeError: Class constructor BaseDriver cannot be invoked without 'new',无法 ...
- atitit。解决 No suitable Log constructor。。NoClassDefFoundError: org/apache/log4j/Category 找不到类的
atitit.解决 No suitable Log constructor..NoClassDefFoundError: org/apache/log4j/Category 找不到类的 1. 深的层次 ...
- Python中错误之 TypeError: object() takes no parameters、TypeError: this constructor takes no arguments
TypeError: object() takes no parameters TypeError: this constructor takes no arguments 如下是学习python类时 ...
- vue-cli报错:Class constructor FileManager cannot be invoked without 'new'
bug:vue-cli3开发的项目,今天项目重新下载依赖启动项目的时候出现错误:Class constructor FileManager cannot be invoked without 'new ...
- Class constructor FileManager cannot be invoked without 'new'
bug:今天项目重新安装依赖打包的时候出现错误:Class constructor FileManager cannot be invoked without 'new' 解决:尝试了很多种解决方案, ...
- vue报错: Class constructor FileManager cannot be invoked without 'new'.
vue中报Class constructor FileManager cannot be invoked without 'new'.错处理: 原因:less 3.10 正式版报错 解决方法很简单,把 ...
- Ext4.0.7使用Ext.grid.ColumnModel报错:TypeError: Ext.grid.Model is not a constructor
代码如下: Ext.onReady(function(){ //定义列 var cm = new Ext.grid.ColumnModel([ {header: '编号', dataIndex: 'i ...
- 解决:TypeError: 'list' object is not callable
如果list变量和list函数重名,会有什么后果呢?我们可以参考如下代码: list = ['泡芙', '汤圆', '鱼儿', '骆驼'] tup_1 = (1, 2, 3, 4, 5) tupToL ...
- vue 报错解决:TypeError: Cannot read property '_t' of undefined"
前端报错如下: [Vue warn]: Error in render: "TypeError: Cannot read property '_t' of undefined" 是 ...
随机推荐
- SQL视图命名规则:一般以V_xxx_xxxxxx
- Postfix邮件服务器
http://www.postfix.org/INSTALL.html https://www.cnblogs.com/alex-note/p/6840160.html http://linux.vb ...
- Apache万网SSl证书安装不成功的一个注意事项(https安全链接,基于phpstudy)
最近,微信小程序挺火,要做小程序网站域名必须要有ssl证书,形成https://的安全链接,我于是从万网上下载了一个免费的ssl证书,按照万网提供的安装方式怎么也安装不好,最后我这个Apache小白费 ...
- JavaScript基础视频教程总结(091-100章)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- Django认证系统
一.cooie与session 1.1 cookie与session cooie不属于http协议范围,由于http协议无法保持状态,但实际情况,我们却又要保持状态,因此cookie就是在这样的一个场 ...
- What's the Difference Between Iterators and Generators in Python
https://www.quora.com/Whats-the-difference-between-iterators-and-generators-in-Python
- openXML向Word插入表
表是 Word 中的另一类型的块级内容,它是以行和列排列的一组段落(以及其他块级内容). Word 中的表格通过 tbl 元素定义,该元素类似于 HTML <表格>标记. 表元素指定文档中 ...
- mysql-exporter
[1] https://blog.frognew.com/2017/08/use-prometheus-monitoring-mysql.html [2] http://www.ywnds.com/? ...
- karaf 控制台 常用linux指令(1)
0,切换命令当前域名 -bash代码 *:feature 命令是由域名+命令名组成的,切换当前域名,比如切换到*:feature,那么再输入list,则执行的是feature:list,切换到*:bu ...
- c++中的const与指针
const修饰符 使用const修饰变量时,该变量的值不可修改,因此需要初始化. 例如 const int s = 0: 此时s为值不可变的变量. 那么基于此,当const修饰指针时的情况有三种: ( ...