首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >angular编译出错解决办法Angular Compiler was detected but it was an instance of the wrong class.

angular编译出错解决办法Angular Compiler was detected but it was an instance of the wrong class.

作者头像
易兒善
发布2018-08-21 15:29:38
5630
发布2018-08-21 15:29:38
举报
文章被收录于专栏:挖坑填坑挖坑填坑

出现如下错误:

错误信息

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版本是多于的,然后去目录下面把它删掉,问题解决。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017.11.15 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档