An unhandled exception occurred: Cannot read property 'Minus' of undefined

Viewed 66847

I uninstall and install the NPM using the command

npm install

and getting error after this I also tried

npm audit fix --force

after that the error come

An unhandled exception occurred: Cannot read property 'Minus' of undefined
See "/private/var/folders/8n/6vsx9lx93lx9wrgxm1q_yv4c0000gn/T/ng-pMlA9a/angular-errors.log" for further details.
npm ERR! Test failed. See above for more details.
7 Answers

got same error. it's bug in new version of @angular/compiler-cli fixed by downgrade version to "10.0.12"

UPD. checked on new version "@angular/compiler": "~10.1.1" - works fine

enter image description here

This is what I've done, clearly says in the terminal:

ng update @angular/cli  
ng update @angular/core 
ng update rxjs

I had to run the following command:

ng update @angular/cli @angular/core --allow-dirty --force

And then remove the line

"es5BrowserSupport": true

from the

angular.json

file.

This is a little bit weird, but yarn install instead of npm install did it for me.

Try updating to latest versions of all the dependencies in package.json. I faced the same issue and spent 2 weeks finding the right solution. Do "ng update" and it will work.

I used the latest version of @angular/compiler

npm install --save-dev  @angular/compiler

Remove ~ and ^ before version numbers from anything related to angular framework and install again.

For example this is my package.json

"dependencies": {
  "@angular/animations": "10.0.5",
  "@angular/bazel": "10.0.5",
  "@angular/cdk": "10.1.0",
  "@angular/common": "10.0.5",
  "@angular/compiler": "10.0.5",
  "@angular/core": "10.0.5",
  "@angular/forms": "10.0.5",
  "@angular/localize": "10.0.5",
  "@angular/platform-browser": "10.0.5",
  "@angular/platform-browser-dynamic": "10.0.5",
  "@angular/router": "10.0.5",
  ......
},
"devDependencies": {
  "@angular-devkit/build-angular": "0.1000.4",
  "@angular-devkit/build-ng-packagr": "0.1000.4",
  "@angular/cli": "10.0.4",
  "@angular/compiler-cli": "10.0.5",
  .....
}
Related