2017-09-23 51 views
0

我在我的角4項目安裝angular2-notifications,一切都很好,但是當我改變機器我嘗試使用ng serve編譯的時候了以下問題:遇到靜態解析符號值時出錯。調用函數「SimpleNotificationsModule」

ERROR in Error: Error encountered resolving symbol values statically. Calling function 'SimpleNotificationsModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in myapp/src/app/app.module.ts, resolving symbol AppModule in myapp/src/app/app.module.ts

回答

0

一些閱讀後similar issues on github我終於找到了解決辦法:

出於某種原因的IntelliJ/Webstorm傾向於進口此包爲:

import { SimpleNotificationsModule } from 'angular2-notifications/dist'; 

應該b E來:

import { SimpleNotificationsModule } from 'angular2-notifications'; 

感謝MattsSe張貼在GitHub上該解決方案。

相關問題