我一直在尝试使用npm命令ng build --configuration = prod在prod模式下构建angular 7应用并生成错误。使用ng build运行时,一切都很好。
我没有看到关于我们编写的组件\服务的任何具体信息。这是错误消息的副本。有没有办法获得真实的信息,或者是否有任何明显的我想念的东西。
ERROR in : Error: Internal error: unknown identifier undefined
at Object.importExpr$$1 [as importExpr] (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24170:27)
at tokenExpr (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:19863:43)
at providerDef (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:19789:24)
at C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:19959:81
at Array.map (<anonymous>)
at NgModuleCompiler.compile (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:19959:48)
at AotCompiler._compileModule (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24115:36)
at C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24034:70
at Array.forEach (<anonymous>)
at AotCompiler._compileImplFile (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24034:23)
at C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24024:74
at Array.map (<anonymous>)
at AotCompiler.emitAllImpls (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24024:39)
at AngularCompilerProgram.generateFilesForEmit (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler-cli\src\transformers\program.js:620:46)
at AngularCompilerProgram._emitRender2 (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler-cli\src\transformers\program.js:266:47)
at AngularCompilerProgram.emit (C:\ui\TestOptimization.UI\client\node_modules\@angular\compiler-cli\src\transformers\program.js:201:22)