简体   繁体   English

在本地运行 Angular 应用程序时出现异常

[英]Getting exception while running Angular application in my local

I'm trying to run my Angular application in my local machine, But I'm getting below error.我正在尝试在我的本地计算机上运行我的 Angular 应用程序,但出现以下错误。

在此处输入图像描述

This is my package.json file这是我的 package.json 文件

{
  "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.注意:我删除了我的 node_modules 文件夹并再次尝试,但出现了同样的错误。

Please help me to resolve this issue, Thanks请帮我解决这个问题,谢谢

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问题是您使用的是旧版本的 Angular,而库 angular jwt 仅支持活动版本,正如他们在软件文档中所说

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

Your library is not compatible with your version of Angular.您的库与您的 Angular 版本不兼容。

According to the changelog for @auth0/angular-jwt , in version 5.0.0 :根据@auth0/angular-jwt的变更日志,在版本5.0.0中:

Note: This release drops support for Angular <12 as those versions are no longer supported by Google themselves.注意:此版本不再支持 Angular <12,因为 Google 不再支持这些版本。

Either downgrade your version of the library, or migrate to a newer version of Angular.要么降级你的库版本,要么迁移到更新版本的 Angular。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为我的第一个 angular 应用程序运行“ng serve”时出错 - Getting error while running "ng serve" for my first angular application 在Angular 6应用程序中运行Bootstrap 4时遇到错误 - getting an error while running Bootstrap 4 with Angular 6 Application Angular 2 应用程序在本地运行,但在运行 ec2 时不起作用 - Angular 2 application is running on local but not working while running ec2 为 Angular 构建应用程序时遇到问题 - Getting issue while build my application for Angular 在 Angular 应用程序中运行 ng 测试时出现空注入器错误 - Getting the null injector errors while running ng test in angular application 运行 Angular 应用程序时出现错误 - I am getting error while Running Angular application 开发角度应用程序时用户本地图像 - User local images while development of angular application 在angular2应用程序中运行ng服务时收到错误'无法读取未定义的属性'长度' - getting error 'Cannot read property 'length' of undefined' while running ng serve in angular2 application 尝试调用本地托管节点 express api 时,在我的 angular 应用程序中出现 CORS 错误 - Getting CORS error in my angular application when try to call local hosted node express api 运行角度版本时出现错误 - Getting error while running angular version
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM