EXCEPTION: No Directive annotation found on e

649 Views Asked by At

I tried to deploy an angular2-meteor project on meteor server.

The app works well locally. And I already did meteor reset before deploying.

Right now it shows a blank page and error:

EXCEPTION: No Directive annotation found on e

I also tried add https, but same error. What does this error mean? Or what can possibly cause this? Thanks

Please open this page and see Console for more error details.

UPDATE: log file I got using meteor logs xxx.

2

There are 2 best solutions below

0
On BEST ANSWER

Now I found why it shows these errors.

If you met similar problems like these:

EXCEPTION: No Directive annotation found on e

Or

ngDoCheck is not a function when using minified bundles

They are all related with UglifyJS. Right now there is no good way to solve them.

Check here and here

9
On

You should include -dev.js files (for example angular2.dev.js) for Angular2 so you'll be able to see more readable errors and especially on which class you have the problem...

<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> <-----

Most of time, you have such error when providing something wrong in the directives attribute of a component. For example providers...