Angular 2/4 Cli提前编译错误

时间:2017-08-23 20:04:05

标签: angular angular-cli angular-aot

我正在尝试构建我的角度Web应用程序的生产版本。我正在使用的命令是:

  

ng build --prod

据我了解,这将使用aot构建应用程序的一个版本。但是,当我尝试上述命令时,我遇到以下错误消息。

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

我似乎无法找出我做错了什么。我在网上看到的每件事都表明这应该有效。任何建议将不胜感激。

0 个答案:

没有答案