Hi everyone!
I am currently puzzled in one of my Angular 7 projects that the build for
production ("ng build --prod") fails with a cryptic error while the regular
build still works fine.
The error message sounds like this:
ERROR in : Error: Internal error: unknown identifier []
at Object.importExpr$$1 [as importExpr]
(..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:22447:27)
at
..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:10011:37
at Array.map (<anonymous>)
at InjectableCompiler.depsArray
(..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:9977:25)
at InjectableCompiler.factoryFor
(..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:10041:36)
at InjectableCompiler.injectableDef
(..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:10060:42)
at InjectableCompiler.compile
(..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:10070:106)
at
..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:22292:90
at Array.forEach (<anonymous>)
at AotCompiler._emitPartialModule2
(..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:22292:25)
at
..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:22285:48
at Array.reduce (<anonymous>)
at AotCompiler.emitAllPartialModules2
(..my-project\node_modules\@angular\compiler\bundles\compiler.umd.js:22284:26)
at AngularCompilerProgram._emitRender2
(..my-project\node_modules\@angular\compiler-cli\src\transformers\program.js:337:31)
at AngularCompilerProgram.emit
(..my-project\node_modules\@angular\compiler-cli\src\transformers\program.js:212:22)
at AngularCompilerPlugin._emit
(..my-project\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:870:49)
As I did not compile for production for a long time I have no clue which
change might have caused the production build to brake.
I already searched the Internet but none of the described possible causes
seems to fit to my project.
I also deleted already the node_modules folder and ran npm install again.
Also running "npm run ng build -- --prod" gived the same error.
Do you have any idea how I could track down the root cause for the error?
This error makes me a little nervous as I just wanted to start a big
project on Angular. But with such cryptic compilation errors I am afraid to
get into a dead end road with the other project one day, too. Because an
Angular project that does not compile for production anymore is dead, isn't
it?
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.