模块“./datasources”没有导出成员“DbDataSource”环回

问题描述

我正在尝试对环回 API 进行身份验证,但我收到模块 '"./datasources"' 没有导出成员 'DbDataSource'。

在我的 application.ts 中有

import {BootMixin} from '@loopback/boot';
import {RepositoryMixin} from '@loopback/repository';
import {RestApplication,OpenApiBuilder,ServerObject} from '@loopback/rest';
import {ServiceMixin} from '@loopback/service-proxy';
import {MySequence} from './sequence';
import {
  AuthenticationBindings,UsersBindings,AssetsBindings,SubjectsBindings,CoursesBindings
} from './keys';
import {
  AuthenticationService,UseRSService,AssetsService,CoursesService,SubjectsService
} from './services'

import {AuthenticationComponent} from '@loopback/authentication';
import {
  JWTAuthenticationComponent,Security_SCHEME_SPEC,UserServiceBindings,} from '@loopback/authentication-jwt';
import {DbDataSource} from './datasources';


export class AtgCodeApplication extends BootMixin(
  ServiceMixin(RepositoryMixin(RestApplication)),) {
  private static instance: AtgCodeApplication;
  constructor(options: ApplicationConfig = {}) {
    super({
      rest: {
        cors: {}
      }
    });

我通过 DbDataSource 获得 Module '"./datasources"' has no exported member 'DbDataSource'. 并在 ApplicationConfig 中获得 Cannot find name 'ApplicationConfig'.Parameter 'options' of constructor from exported class has or is using private name 'ApplicationConfig'.

我在 https://loopback.io/doc/en/lb4/Authentication-tutorial.html#step-1-bind-jwt-component-in-the-application 中使用 auth 程序作为公会。

我该如何修复这些错误

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...