升级后环回项目中断

时间:2020-09-02 03:36:07

标签: loopbackjs loopback4

在使用命令“ 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

0 个答案:

没有答案