Angular AOT构建失败

时间:2018-01-05 12:32:19

标签: javascript angular angular2-aot

D:\server7\OSPanel\domains\bb.ru\src_angular\admin\src\$$_gendir\app\app.module.ngfactory doesn't exist
  .ts
    Field 'browser' doesn't contain a valid alias configuration
    D:\server7\OSPanel\domains\bb.ru\src_angular\admin\src\$$_gendir\app\app.module.ngfactory.ts doesn't exist
  .js
    Field 'browser' doesn't contain a valid alias configuration
    D:\server7\OSPanel\domains\bb.ru\src_angular\admin\src\$$_gendir\
    app\app.module.ngfactory.js doesn't exist
    as directory
    D:\server7\OSPanel\domains\bb.ru\src_angular\admin\
    src\$$_gendir\app\app.module.ngfactory doesn't exist
    [D:\server7\OSPanel\domains\bb.ru\src_angular\admin\src\
    $$_gendir\app\app.module.ngfactory]
    [D:\server7\OSPanel\domains\bb.ru\src_angular\admin\src\
    $$_gendir\app\app.module.ngfactory.ts]
    [D:\server7\OSPanel\domains\bb.ru\src_angular\admin\src\
    $$_gendir\app\app.module.ngfactory.js]
    [D:\server7\OSPanel\domains\bb.ru\src_angular\admin\src\
    $$_gendir\app\app.module.ngfactory]
    @ ../src/main.ts 4:29-76
    @ multi webpack-dev-server/client?http://0.0.0.0:0 ../src/main.ts
   ERROR in Error: Internal error: unknown identifier undefined
     at Object.importExpr$$1 [as importExpr] 

   (D:\server7\OSPanel\domains\bb.ru\src_angular\admin\node_modules\
   @angular\compiler\bundles\compiler.umd.js:24071:23)
   at tokenExpr 

  (D:\server7\OSPanel\domains\bb.ru\src_angular\admin\
  node_modules\@angular\compiler\bundles\compiler.umd.js:18428:39)
  at providerDef (D:\server7\OSPanel\domains\bb.ru\src_angular\admin\
  node_modules\@angular\compiler\bundles\compiler.umd.js:18331:20)
  at 
  D:\server7\OSPanel\domains\bb.ru\src_angular\admin\
  node_modules\@angular\compiler\bundles\compiler.umd.js:18548:77
  at Array.map (native)
  at NgModuleCompiler.compile 
  (D:\server7\OSPanel\domains\bb.ru\src_angular\admin\
  node_modules\@angular\compiler\bundles\compiler.umd.js:18548:44)
  at AotCompiler._compileModule ( 
  D:\server7\OSPanel\domains\bb.ru\src_angular\admin\node_modules
  \@angular\compiler\bundles\compiler.umd.js:24004:32)
  at D:\server7\OSPanel\domains\bb.ru\src_angular\
  admin\node_modules\@angular\compiler\bundles\compiler.umd.js:23916:66
  at Array.forEach (native)
  at AotCompiler._compileImplFile 
  (D:\server7\OSPanel\domains\bb.ru\src_angular\
  admin\node_modules\@angular\compiler\bundles\
  compiler.umd.js:23916:19)
  at D:\server7\OSPanel\domains\bb.ru\src_angular\
  admin\node_modules\@angular\compiler\bundles
  \compiler.umd.js:23829:87
  at Array.map (native)
  at AotCompiler.emitAllImpls 
 (D:\server7\OSPanel\domains\bb.ru\src_angular\
 admin\node_modules\@angular\compiler\bundles\compiler.umd.js:23829:52)
 at CodeGenerator.emit 
 (D:\server7\OSPanel\domains\bb.ru\src_angular\
 admin\node_modules\@angular\compiler-cli\src\codegen.js:42:46)
 at D:\server7\OSPanel\domains\bb.ru\src_angular\
 admin\node_modules\@angular\compiler-cli\src\codegen.js:33:61
 at process._tickCallback (internal/process/next_tick.js:109:7)
 webpack: Failed to compile.

当我使用-aot键构建时,我收到此消息,我真的不明白发生了什么......任何建议都会受到高度赞赏。

我在项目中使用以下版本的库:

  • @ angular / cli:1.6.3 @ angular-devkit / build-optimizer:0.0.36 @ angular-devkit / core:0.0.22 @ angular-devkit / schematics:0.0.42 @ ngtools / json-schema:1.1.0 @ ngtools / webpack:1.9.3 @ schematics / angular:0.1.11 @ schematics / schematics:0.0.11 typescript:2.3.4 webpack-dev-server:2.4.5 webpack:3.10.0

0 个答案:

没有答案