Adobe-Marketing-Cloud / target-atjs-extensions

Adobe Target extensions to at.js to support Single Page Application implementations
56 stars 28 forks source link

Unable to build with Angular-CLI in prod mode #39

Open zachallen opened 6 years ago

zachallen commented 6 years ago

Cloning https://github.com/Adobe-Marketing-Cloud/target-atjs-extensions/tree/master/demos/examples/angular2/directive and running an ng build --prod results in:

ERROR in <WORKSPACE>/target-atjs-extensions/demos/examples/angular2/directive/src/$$_gendir/app/app.component.ngfactory.ts (11,21): Cannot find module 'target-ng-module'.

ERROR in <WORKSPACE>/target-atjs-extensions/demos/examples/angular2/directive/src/$$_gendir/node_modules/@adobe/target-ng-module/target-ng-module.ngfactory.ts (10,21): Cannot find module 'target-ng-module'.

ERROR in <WORKSPACE>/target-atjs-extensions/demos/examples/angular2/directive/src/$$_gendir/app/app.module.ngfactory.ts (15,21): Cannot find module 'target-ng-module'.

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '<WORKSPACE>/target-atjs-extensions/demos/examples/angular2/directive/src'
 @ ./src/main.ts 3:0-74
 @ multi ./src/main.ts
XDex commented 6 years ago

@zachallen Just took a quick look - this seems to be a problem with AOT compilation in recent angular-cli. Disabling AOT fixed it (ng build -prod -aot false), however if you really need AOT, feel free to try some possible fixes suggested in this issue: https://github.com/angular/angular-cli/issues/4551

revsystems-2018 commented 6 years ago

Queremos ejecutar con AOT y tu lo cancelas.. que estupidez..!