美文网首页Angular学习实践一步一坑
angular编译出错解决办法Angular Compiler

angular编译出错解决办法Angular Compiler

作者: 易兒善 | 来源:发表于2017-11-15 19:03 被阅读26次

出现如下错误:


错误信息
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.

大致意思是,出现错误,原因可能是安装了几个不同版本的@ngtools/webpack包,你可以使用npm ls @ngtools/webpack命令来检查,然后删除多余的副本。

npm ls @ngtools/webpack
果然有两个版本

提示@ngtools/webpack@1.8.0版本是多于的,然后去目录下面把它删掉,问题解决。

相关文章

网友评论

    本文标题: angular编译出错解决办法Angular Compiler

    本文链接:https://www.haomeiwen.com/subject/qephvxtx.html