I am trying to build a production version of my angular web application. The command that I am using is:
ng build --prod
It is my understanding that this will build a version of the application using aot. However when I try the above command I am met with the following error message.
ERROR in D:/git/tpa/tpa-tnet/TNET.Invoices.Api/TNET.Invoices.Web/src/$$_gendir/app/content/headers/header-list/edit-invoice-details/edit-invoice-details.component.ngfactory.ts (21,22): Cannot find module './edit-detail/edit-detail.
component.ngfactory'.
ERROR in D:/git/tpa/tpa-tnet/TNET.Invoices.Api/TNET.Invoices.Web/src/$$_gendir/app/content/headers/header-list/edit-invoice-details/edit-invoice-details.component.ngfactory.ts (21,22): Cannot find module './edit-detail/edit-detail.
component.ngfactory'.
ERROR in ./src/$$_gendir/app/content/headers/header-list/edit-invoice-details/edit-invoice-details.component.ngfactory.ts
Module not found: Error: Can't resolve './edit-detail/edit-detail.component.ngfactory' in 'D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details'
resolve './edit-detail/edit-detail.component.ngfactory' in 'D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details'
using description file: D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\package.json (relative path: ./src/$$_gendir/app/content/headers/header-list/edit-invoice-details)
Field 'browser' doesn't contain a valid alias configuration
after using description file: D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\package.json (relative path: ./src/$$_gendir/app/content/headers/header-list/edit-invoice-details)
using description file: D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\package.json (relative path: ./src/$$_gendir/app/content/headers/header-list/edit-invoice-details/edit-detail/edit-detail.component.ngfactory)
no extension
Field 'browser' doesn't contain a valid alias configuration
D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory.ts doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory.js doesn't exist
as directory
D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory doesn't exist
[D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory]
[D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory.ts]
[D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory.js]
[D:\git\tpa\tpa-tnet\TNET.Invoices.Api\TNET.Invoices.Web\src\$$_gendir\app\content\headers\header-list\edit-invoice-details\edit-detail\edit-detail.component.ngfactory]
@ ./src/$$_gendir/app/content/headers/header-list/edit-invoice-details/edit-invoice-details.component.ngfactory.ts 19:0-69
@ ./src/$$_gendir/app/content/headers/header-list/header-list.component.ngfactory.ts
@ ./src/$$_gendir/app/app.module.ngfactory.ts
@ ./src/main.ts
@ multi ./src/main.ts
I can't seem to find out what I am doing wrong. Every thing I saw online suggest that this should just work. Any advice will be much appreciated.