首页 > 解决方案 > 升级后Auth Lib接口改变了吗?

问题描述

我的 Angular 应用程序编译正常,但是当我运行它时,它并没有获取所有链接,但有些链接有效并给了我这个错误:

ERROR TypeError: auth_lib_index__WEBPACK_IMPORTED_MODULE_17__.AuthInterceptor is not a constructor
    AppModuleNgFactory main.f8ddb6c4f3c29f6b2869.js:61468
    Angular 6
    RxJS 12
    ngOnInit terms.component.ts:23
    Angular 4
    View_AppComponent_0 app.component.html:2
    Angular 23
core.js:15724
    Angular 4
    RxJS 5
    Angular 20
    RxJS 20
    ngOnInit terms.component.ts:23
    Angular 4
    View_AppComponent_0 app.component.html:2
    Angular 23

当我执行 GET 请求时会发生这种情况:

       ngOnInit() {
           this.getJSON().subscribe((data : any[]) => {this.terms=data['terms']; });
       };

我当前运行的 auth-lib 版本是

~/projects-new/cirrus-bluecost-rules-client/client$ npm view auth-lib

auth-lib@1.0.0 | ISC | deps: none | versions: 1
test auth lib
https://github.com/alainr3d/auth-lib#readme

dist
.tarball: https://registry.npmjs.org/auth-lib/-/auth-lib-1.0.0.tgz
.shasum: de2c0fbe3e26d9377304c6051360f4ff37869dc9

maintainers:
- alainr3d <alaindilig@gmail.com>

dist-tags:
latest: 1.0.0

这似乎是对 0.0.1 的升级。

标签: angularauthenticationauthlib

解决方案


推荐阅读