You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Angular13升级后BrowserModule重复加载问题求助

Angular 13升级后BrowserModule重复加载报错问题

我接手的一个企业项目在从Angular 12升级到Angular 13后出现异常:项目中存在一个可独立运行(主要用于本地组件测试)的应用,同时它也是主项目的依赖库。目前该库无法独立启动,主项目运行时浏览器控制台抛出如下错误:

Uncaught (in promise): Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.
Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.

我已参考相关技术线程尝试解决,也试过移除库或项目中的部分内容,但均未奏效。现附上库和主项目的模块代码及依赖配置,恳请协助排查问题。

内容的提问来源于stack exchange,提问作者Teuz

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 02:53:10