Open david-labib opened 3 days ago
the same error happens to me
ayslansiqueira in wppconnect-server on main [!]
❯ yarn build
yarn run v1.22.22
warning ../../../../package.json: No license field
$ npm run build:types && npm run build:js
@wppconnect/server@2.8.1 build:types tsc
src/routes/index.ts:120:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
120 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:127:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
127 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:134:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
134 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:147:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
147 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:347:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
347 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:686:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
686 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:693:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
693 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:812:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
812 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:852:3 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").ParamsDict...' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").RequestHandler<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Recor...'. Types of parameters 'req' and 'req' are incompatible. Type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").ParamsDictionary, any, any, qs.ParsedQs, Record<...>>' is not assignable to type 'import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").Request<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index")...'. The types of 'app.get' are incompatible between these types. Type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/express-serve-static-core/index").Application<Record<s...' is not assignable to type '((name: string) => any) & import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/express-serve-static-core/index").IRouterMatcher<import("/Users/ayslansiqueira/Documents/projects/astech/wppconnect-server/node_modules/@types/multer/node_modules/@types/...'. Type '((name: string) => any) & IRouterMatcher<Application<Record<string, any>>, any>' is not assignable to type 'IRouterMatcher<Application<Record<string, any>>, any>'. Types of parameters 'name' and 'path' are incompatible. Type 'PathParams' is not assignable to type 'string'. Type 'RegExp' is not assignable to type 'string'.
852 upload.single('file'),
node_modules/@types/express-serve-static-core/index.d.ts:153:5
153 <
~
154 P = ParamsDictionary,
...
162 ...handlers: Array<RequestHandlerParams<P, ResBody, ReqBody, ReqQuery, LocalsObj>>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163 ): T;
~~~~~~~~~
The last overload is declared here.
src/routes/index.ts:935:25 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[]' is not assignable to parameter of type 'Application<Record<string, any>>'. Type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[]' is missing the following properties from type 'Application<Record<string, any>>': init, defaultConfiguration, engine, set, and 62 more.
935 routes.use('/api-docs', swaggerUi.serve);
node_modules/@types/express-serve-static-core/index.d.ts:164:5
164 (path: PathParams, subApplication: Application): T;
The last overload is declared here.
src/routes/index.ts:936:25 - error TS2769: No overload matches this call. The last overload gave the following error. Argument of type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is not assignable to parameter of type 'Application<Record<string, any>>'. Type 'RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>>' is missing the following properties from type 'Application<Record<string, any>>': init, defaultConfiguration, engine, set, and 63 more.
936 routes.get('/api-docs', swaggerUi.setup(swaggerDocument));
node_modules/@types/express-serve-static-core/index.d.ts:164:5
164 (path: PathParams, subApplication: Application): T;
The last overload is declared here.
Found 11 errors in the same file, starting at: src/routes/index.ts:120
error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ayslansiqueira in wppconnect-server on main [!] took 3s ❯
Workaround:
change Dockerfile line:
RUN yarn build
to
RUN yarn build:js
error while trying to build the exact last release
just download the release then run
docker compose up -d