BrowserModule已经加载错误 [英] BrowserModule has already been loaded Error
问题描述
我已将我的应用程序更新为RC6,现在我不断收到此错误:
I've updated my application to RC6 and now i keep getting this error:
zone.js:484未处理的承诺拒绝:BrowserModule已经存在 已加载.如果您需要访问常用指令,例如NgIf和 NgFor是从延迟加载的模块...
zone.js:484 Unhandled Promise rejection: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module...
我正在使用延迟加载,并且我的应用程序分解为许多延迟加载的模块.但是在RC5中,一切正常.
I'm using lazy loading and my application is broken up in to a lot of lazy loaded modules. However in RC5 everything worked fine.
我设法在RC6的变更日志中找到的唯一变更是:
The only change I've managed to find in the changelog for RC6 is this:
编译器:为无效的NgModule抛出描述性错误消息 提供者
compiler: throw descriptive error meesage for invalid NgModule providers
但是,由于我没有在RC5中看到任何错误,因此这可能不适用于这里.
But since i haven't seen any errors in RC5 this probably doesn't apply here.
我有点主意,所以我们将不胜感激.
I'm kind of out of ideas so any help is greatly appreciated.
推荐答案
我已经设法解决了我的问题.我使用的库之一是导入BrowserModule
.
I've managed to solve my problem. One of the libraries i was using was importing the BrowserModule
.
如果有人遇到同样的问题,我将在此处保留该问题.
I'll just leave the question here in case someone has the same issue.
这篇关于BrowserModule已经加载错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!