参考错误:未定义ngI18nClosureMode [英] Reference error: ngI18nClosureMode is not defined
问题描述
我尝试部署Angular 7 Web应用程序,并引发错误-未捕获(承诺):ReferenceError:ngI18nClosureMode未定义.
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.
有人遇到这种错误吗?
提前谢谢!
推荐答案
发生这种情况的主要原因是软件包版本不一致.由于您将所有版本降级为与 8.0.0
匹配,因此该问题已解决.我遇到了同样的问题,我的 angular-cli
版本是 8.2.1
,其他版本设置为 8.2.7
.将所有内容更改为 8.2.7
即可解决此问题.
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.
另一种可能性是,您可能会遇到找不到"AppModule"的NgModule元数据
问题.这是由版本不一致引起的另一个问题.
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.
希望这对您将来有用.
这篇关于参考错误:未定义ngI18nClosureMode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!