例外:在 e 上未找到指令注释

EXCEPTION: No Directive annotation found on e

我试图在 meteor server 上部署一个 angular2-meteor 项目。

该应用程序在本地运行良好。在部署之前我已经做了 meteor reset

现在显示空白页和错误:

EXCEPTION: No Directive annotation found on e

我也尝试添加 https,但同样的错误。这个错误是什么意思?或者什么可能导致这个?谢谢

请打开 this page 并查看控制台以了解更多错误详情。

更新log file 我开始使用 meteor logs xxx

您应该为 Angular2 包含 -dev.js 个文件(例如 angular2.dev.js),这样您将能够看到更易读的错误,尤其是 class 您遇到问题的错误。 ..

<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script> <-----
<script src="node_modules/angular2/bundles/router.dev.js"></script> <-----
<script src="node_modules/angular2/bundles/http.dev.js"></script> <-----

大多数时候,当在组件的 directives 属性中提供错误时,您会遇到这样的错误。例如供应商...

现在我找到了显示这些错误的原因。

如果您遇到类似这样的问题:

EXCEPTION: No Directive annotation found on e

ngDoCheck is not a function when using minified bundles

它们都与UglifyJS有关。目前还没有很好的解决办法

勾选here and here