出现如下错误:
错误信息
代码语言:javascript复制Module build failed: Error: Angular Compiler was detected but it was an instance of the wrong class.
This likely means you have several @ngtools/webpack packages installed. You can check this with `npm ls @ngtools/webpack`, and then remove the extra copies.
代码语言:javascript复制大致意思是,出现错误,原因可能是安装了几个不同版本的@ngtools/webpack包,你可以使用npm ls @ngtools/webpack命令来检查,然后删除多余的副本。
npm ls @ngtools/webpack
果然有两个版本
提示@ngtools/webpack@1.8.0版本是多于的,然后去目录下面把它删掉,问题解决。