问题描述:在工作过程中出现 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'的更多相关文章

  1. 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',无法 ...

  2. atitit。解决 No suitable Log constructor。。NoClassDefFoundError: org/apache/log4j/Category 找不到类的

    atitit.解决 No suitable Log constructor..NoClassDefFoundError: org/apache/log4j/Category 找不到类的 1. 深的层次 ...

  3. Python中错误之 TypeError: object() takes no parameters、TypeError: this constructor takes no arguments

    TypeError: object() takes no parameters TypeError: this constructor takes no arguments 如下是学习python类时 ...

  4. vue-cli报错:Class constructor FileManager cannot be invoked without 'new'

    bug:vue-cli3开发的项目,今天项目重新下载依赖启动项目的时候出现错误:Class constructor FileManager cannot be invoked without 'new ...

  5. Class constructor FileManager cannot be invoked without 'new'

    bug:今天项目重新安装依赖打包的时候出现错误:Class constructor FileManager cannot be invoked without 'new' 解决:尝试了很多种解决方案, ...

  6. vue报错: Class constructor FileManager cannot be invoked without 'new'.

    vue中报Class constructor FileManager cannot be invoked without 'new'.错处理: 原因:less 3.10 正式版报错 解决方法很简单,把 ...

  7. 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 ...

  8. 解决:TypeError: 'list' object is not callable

    如果list变量和list函数重名,会有什么后果呢?我们可以参考如下代码: list = ['泡芙', '汤圆', '鱼儿', '骆驼'] tup_1 = (1, 2, 3, 4, 5) tupToL ...

  9. vue 报错解决:TypeError: Cannot read property '_t' of undefined"

    前端报错如下: [Vue warn]: Error in render: "TypeError: Cannot read property '_t' of undefined" 是 ...

随机推荐

  1. dom4j移除节点不成功

    在使用dom4j的时候想移除xml节点,经常使用remove来移除节点,通过整个文档或者根节点删除某一个子节点,但如果子节点不是儿子节点,在dom4j中就无法删除.在dom4j中移除节点必须使用父节点 ...

  2. AX_Unit

    UnitConvert::qty(_deliverNow,      salesLine.SalesUnit,      salesLine.inventTable().inventUnitId(), ...

  3. Linux学习笔记:重定向>和>>

    本文参考 https://www.cnblogs.com/piperck/p/6219330.html 重定向命令 > 和 >> 将命令的输出结果存储在指定文件中. 例如下面的例子就 ...

  4. Maven学习 六 pom.xml文件

    java jar包的搜索网址:http://mvnrepository.com/ pom作为项目对象模型.通过xml表示maven项目,使用pom.xml来实现.主要描述了项目:包括配置文件:开发者需 ...

  5. oracle分区表的使用和查询

    本文参考了 https://blog.csdn.net/mzglzzc/article/details/46300645 一  创建和使用分区表 1.范围分区(RANGE)范围分区将数据基于范围映射到 ...

  6. 【Selenium】【BugList9】windows环境,fp = open("./"+ time.strftime("%Y-%m-%d %H:%M:%S") + " result.html",'wb'),报错:OSError: [Errno 22] Invalid argument: './2018-09-05 10:29:32 result.html'

    [代码] if __name__=="__main__": suite = unittest.TestSuite() suite.addTest(Baidu("test_ ...

  7. docker私库Harbor部署(转载)

    系统环境 centos7.3docker-ce docker version: 18.03.0docker-compose version: 1.21.0 Install Docker CE 安装依赖 ...

  8. 常用API2 正则表达式

    正则表达式 正则表达式的概念 正则表达式(Regular Expression ,在代码中常简写为regex) 正则表达式是一个字符串,使用单个字符串来描述.用来定义匹配规则,匹配一系列符合某个句法规 ...

  9. Codeforces Round #548 (Div. 2) E 二分图匹配(新坑) or 网络流 + 反向处理

    https://codeforces.com/contest/1139/problem/E 题意 有n个学生,m个社团,每个学生有一个\(p_i\)值,然后每个学生属于\(c_i\)社团, 有d天,每 ...

  10. 《NoSQL精粹》读后感

    <NoSQL精粹>作者Pramod J. Sadalaga.Martin Flower著,译者爱飞翔. 本书以关系型数据库开头,讲解了关系型数据库的优缺点,然后引入了NoSQL数据库,并且 ...