Home > Software engineering >  Getting exception while running Angular application in my local
Getting exception while running Angular application in my local

Time:12-28

I'm trying to run my Angular application in my local machine, But I'm getting below error.

enter image description here

This is my package.json file

{
  "name": "appauth-angular",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "author": "KD, Angular",
  "private": true,
  "dependencies": {
    "@angular/animations": "~8.2.14",
    "@angular/common": "~8.2.14",
    "@angular/compiler": "~8.2.14",
    "@angular/core": "~8.2.14",
    "@angular/forms": "~8.2.14",
    "@angular/platform-browser": "~8.2.14",
    "@angular/platform-browser-dynamic": "~8.2.14",
    "@angular/router": "~8.2.14",
    "@auth0/angular-jwt": "^5.1.2",
    "@openid/appauth": "^1.2.6",
    "bootstrap": "^4.4.1",
    "rxjs": "~6.4.0",
    "tslib": "^1.10.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.20",
    "@angular/cli": "~8.3.20",
    "@angular/compiler-cli": "~8.2.14",
    "@angular/language-service": "~8.2.14",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.5.3"
  }
}

Note : I have deleted my node_modules folder and tried again, but getting same error.

Please help me to resolve this issue, Thanks

CodePudding user response:

Your library is not compatible with your version of Angular.

According to the changelog for @auth0/angular-jwt, in version 5.0.0:

Note: This release drops support for Angular <12 as those versions are no longer supported by Google themselves.

Either downgrade your version of the library, or migrate to a newer version of Angular.

CodePudding user response:

The problem is that you are using an old version of Angular, while the library angular jwt support only the active one as they say in software documentation

Requirements
This project only supports the actively supported versions of Angular as stated in the Angular documentation. Whilst other versions might be compatible they are not actively supported
  • Related