Сначала я новичок в angular, loopback и node. Я пытаюсь реализовать решение использовать компонент хранения с LB4 ", как использовать компоненты хранения в loopback 4.0?
". Когда я запускаю свое приложение, у меня появляется ошибка, и я не знаю, как ее решить. Я пытаюсь разобраться в проблеме с помощью Google, и если я прав, то это проблема с Promise, но я по-прежнему слеп.
Не могли бы вы мне помочь?
Node : 10.16.0
@angular-devkit/architect 0.800.2 (cli-only)
@angular-devkit/core 8.0.2 (cli-only)
@angular-devkit/schematics 8.0.2 (cli-only)
@schematics/angular 8.0.2 (cli-only)
@schematics/update 0.800.2 (cli-only)
rxjs 6.5.2
typescript 3.5.1
вот журнал ошибок:
> src/providers/storage-service.provider.ts:11:5 - error TS2322: Type 'FilesXmlDataSource' is not assignable to type 'DataSource'.
> Types of property 'connector' are incompatible.
> Type 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/loopback-datasource-juggler/types/connector").Connector
> | undefined' is not assignable to type
> 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/@loopback/service-proxy/node_modules/loopback-datasource-juggler/types/connector").Connector
> | undefined'.
> Type 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/loopback-datasource-juggler/types/connector").Connector'
> is not assignable to type
> 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/@loopback/service-proxy/node_modules/loopback-datasource-juggler/types/connector").Connector'.
> Types of property 'dataSource' are incompatible.
> Type 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/loopback-datasource-juggler/types/datasource").DataSource
> | undefined' is not assignable to type
> 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/@loopback/service-proxy/node_modules/loopback-datasource-juggler/types/datasource").DataSource
> | undefined'.
> Type 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/loopback-datasource-juggler/types/datasource").DataSource'
> is not assignable to type
> 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/@loopback/service-proxy/node_modules/loopback-datasource-juggler/types/datasource").DataSource'.
> Types of property 'automigrate' are incompatible.
> Type '(models: string | string[], callback?: import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/loopback-datasource-juggler/types/common").Callback<any>
> | undefined) =>
> import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/loopback-datasource-juggler/types/common").PromiseOrVoid<...>'
> is not assignable to type '(models: string | string[], callback?:
> import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/@loopback/service-proxy/node_modules/loopback-datasource-juggler/types/common").Callback<any>
> | undefined) =>
> import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/@loopback/service-proxy/node_modules/loo...'.
> Type 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/loopback-datasource-juggler/types/common").PromiseOrVoid<any>'
> is not assignable to type
> 'import("/Volumes/LaCie/ProjetDev/WrkNode/lapv-rest/node_modules/@loopback/service-proxy/node_modules/loopback-datasource-juggler/types/common").PromiseOrVoid<any>'.
> Type 'PromiseLike<any>' is not assignable to type 'PromiseOrVoid<any>'.
> Type 'PromiseLike<any>' is missing the following properties from type 'Promise<any>': catch,
> [Symbol.toStringTag], finally