Reference error: ngI18nClosureMode is not defined

て烟熏妆下的殇ゞ 提交于 2021-01-29 20:51:55

问题


I tried to deploy my Angular 7 web application and it throws an error - Uncaught (in promise): ReferenceError: ngI18nClosureMode is not defined.

The application works fine when run locally.

Did anyone come across this kind of error?

Thanks in advance!


回答1:


This happens mainly because of the inconsistency in package versions. Since you downgraded all versions to match 8.0.0, the issue was resolved. I encountered the same problem, where my angular-cli version was 8.2.1 and others were set to 8.2.7. Changing everything to 8.2.7 resolved the issue.

Another possibility is that you might encounter No NgModule metadata found for 'AppModule' issue. This is another one of the problems caused by inconsistency in versions.

Hope this comes handy for you in future.




回答2:


Just posting it incase it might be useful for others - I was able to resolve this issue by downgrading all my @angular/* packages to 8.0.0 and rebuilding.



来源:https://stackoverflow.com/questions/57898373/reference-error-ngi18nclosuremode-is-not-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!