升级后环回项目中断

问题描述

在使用命令“ lb4 model”创建模型后,它要求我更新依赖项,在编译时进行安装后抛出此错误,我该如何解决

> adselfservice@1.0.0 build C:\Users\PC\WebstormProjects\adselfservice-node-backend
> lb-tsc

src/__tests__/acceptance/test-helper.ts:57:38 - error TS2345: Argument of type 'AdSelfServiceApplication' is not assignable to parameter of type 'RestApplicationLike'.
  Property 'restServer' is missing in type 'AdSelfServiceApplication' but required in type 'RestApplicationLike'.

57   const client = createRestAppClient(app);
                                        ~~~

  node_modules/@loopback/testlab/dist/client.d.ts:20:5
    20     restServer: RestServerLike;
           ~~~~~~~~~~
    'restServer' is declared here.

src/application.ts:20:32 - error TS2345: Argument of type 'typeof RestApplication' is not assignable to parameter of type 'Constructor<{ readonly options: ApplicationConfig; re
adonly state: string; controller: <T>(controllerCtor: Constructor<T>,nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<...>; ... 53 more ...; listenerCo
unt: (type: string | symbol) => number; }>'.
  Construct signature return types 'RestApplication' and '{ readonly options: ApplicationConfig; readonly state: string; controller: <T>(controllerCtor: Constructor<T>,nameOrO
ptions?: string | BindingFromClassOptions | undefined) => Binding<...>; ... 53 more ...; listenerCount: (type: string | symbol) => number; }' are incompatible.
    The types returned by 'controller(...)' are incompatible between these types.
      Type 'import("C:/Users/PC/WebstormProjects/adselfservice-node-backend/node_modules/@loopback/rest-explorer/node_modules/@loopback/context/dist/binding").Binding<T>' is no
t assignable to type 'import("C:/Users/PC/WebstormProjects/adselfservice-node-backend/node_modules/@loopback/context/dist/binding").Binding<T>'.
        Types have separate declarations of a private property '_scope'.

20   ServiceMixin(RepositoryMixin(RestApplication)),~~~~~~~~~~~~~~~

LogImage

IDEImage

解决方法

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

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

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

相关问答

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