2017-06-13 55 views
0

我使用NG-閃電在我的角度項目,運行AOT我得到以下錯誤,當以ng雷擊模塊之一彙總AOT錯誤:「A模塊不能導入自己」

aot\node_modules\ng-lightning\popovers\popover.ngfactory.js (10:0) 

     A module cannot import itself 
    .. 
    import * as i3 from './popover.ngfactory'; 

任何想法如何克服這樣的錯誤?

回答

4

有一個issue目前在角4.2中導致此問題時編譯使用匯總。我建議現在降級到角度4.1或等待補丁。

+0

什麼需要降級?這很奇怪,因爲我只有ng-lightning這個問題,而不是一般的 – Yuvals

+1

Angular本身。它會影響其他依賴於角度的包。請參閱https://github.com/angular/material2/issues/5081和https://github.com/angular/angular/commit/ed73d4f3ac6b542bf5ea3eb73fbe91e2ceabcdb4。您在項目中使用的角度版本是什麼? – Raven

+0

我正在使用4.2.2。那麼你是否建議降級核心? – Yuvals