【发布时间】:2021-01-21 18:24:28
【问题描述】:
我正在使用 Angular 10 和最新的 JWT Helper 服务。但应用程序无法编译。
错误状态如下: ERROR in node_modules/@auth0/angular-jwt/lib/jwthelper.service.d.ts
我搜索了类似的问题,但找不到答案。这是第一次发生这种情况。
控制台还报告以下内容:This likely means that the library (@auth0/angular-jwt) which declares JwtHelperService has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy
我已经删除了节点包文件夹,做了npm i 并且错误仍然存在。这意味着 Helper Service 与 Angular 10 不兼容?
我的包 JSON:
"dependencies": {
"@angular/animations": "~10.0.4",
"@angular/cdk": "^10.2.3",
"@angular/common": "~10.0.4",
"@angular/compiler": "~10.0.4",
"@angular/core": "~10.0.4",
"@angular/forms": "~10.0.4",
"@angular/localize": "~10.0.4",
"@angular/material": "^10.2.3",
"@angular/platform-browser": "~10.0.4",
"@angular/platform-browser-dynamic": "~10.0.4",
"@angular/router": "~10.0.4",
"@auth0/angular-jwt": "^5.0.1",
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"bootstrap": "^4.5.0",
"ng2-validation": "^4.2.0",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.3",
"@angular/cli": "~10.0.3",
"@angular/compiler-cli": "~10.0.4",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
}
任何帮助将不胜感激
【问题讨论】:
标签: angular compilation ivy jwt-auth