I recently started developing an Angular app with a purchased template and collaborating with another developer. Initially, I was able to successfully build the project for production using ng build --prod
. However, when trying to build it again yesterday, I encountered the error message
TypeError: visitor.visitUnaryOperatorExpr is not a function
(full error provided below). Is there a way to obtain a complete stack trace or fix this issue? Here are some of the steps I've attempted:
- building with
ng build --prod --source-map=true
- trying to compile with
ng build --configuration=production --source-map=true
- updating all node and angular packages through npm
Below you can find the generated stack trace:
Error: TypeError: visitor.visitUnaryOperatorExpr is not a function
at UnaryOperatorExpr.visitExpression (M:\User\Documents\GitHub\Website-2.0\node_modules\@angular\compiler\bundles\compiler.umd.js:1976:28)
at NodeEmitterVisitor.visitConditionalExpr (M:\User\Documents\GitHub\Website-2.0\node_modules\@angular\compiler-cli\src\transformers\node_emitter.js:468:132)
at ConditionalExpr.visitExpression (M:\User\Documents\GitHub\Website-2.0\node_modules\@angular\compiler\bundles\compiler.umd.js:1865:28)
...additional error trace here...