No overload matches this call.
Overload 1 of 2, '(opts?: Options<IncomingMessage, ServerResponse<IncomingMessage>, never> | undefined, stream?: DestinationStream | undefined): HttpLogger<...>', gave the following error.
Type 'Logger<never, boolean>' is not assignable to type 'Logger<never, boolean> | undefined'.
Type 'import("/projectpath/node_modules/pino/pino").Logger<never, boolean>' is not assignable to type 'import("/projectpath/node_modules/pino-http/node_modules/pino/pino").default.Logger<never, boolean>'.
Type 'Logger<never, boolean>' is not assignable to type 'LoggerExtras<never, boolean>'.
The types returned by 'child(...)' are incompatible between these types.
Type 'import("/projectpath/node_modules/pino/pino").Logger<ChildCustomLevels, boolean>' is not assignable to type 'import("/projectpath/node_modules/pino-http/node_modules/pino/pino").default.Logger<ChildCustomLevels, boolean>'.
Type 'Logger<ChildCustomLevels, boolean>' is not assignable to type 'LoggerExtras<ChildCustomLevels, boolean>'.
Types of property 'onChild' are incompatible.
Type 'import("/projectpath/node_modules/pino/pino").OnChildCallback<ChildCustomLevels>' is not assignable to type 'OnChildCallback<ChildCustomLevels>'.
Types of parameters 'child' and 'child' are incompatible.
Type 'import("/projectpath/node_modules/pino-http/node_modules/pino/pino").default.Logger<ChildCustomLevels, boolean>' is not assignable to type 'import("/projectpath/node_modules/pino/pino").Logger<ChildCustomLevels, boolean>'.
Property 'msgPrefix' is missing in type 'BaseLogger & LoggerExtras<ChildCustomLevels, boolean> & { customLevels: { [level in ChildCustomLevels]: number; }; useOnlyCustomLevels: boolean; } & { [K in Exclude<...> | ... 4 more ... | Exclude<...>]: LogFn; } & { [level in ChildCustomLevels]: LogFn; }' but required in type 'BaseLogger'.
Overload 2 of 2, '(stream?: DestinationStream | undefined): HttpLogger<IncomingMessage, ServerResponse<IncomingMessage>, never>', gave the following error.
Object literal may only specify known properties, and 'logger' does not exist in type 'DestinationStream'.ts(2769)
pino.d.ts(224, 13): 'msgPrefix' is declared here.
When upgrading
pinoup-to or beyond9.8, aloggercannot be specified anymore.If I were to hazard a guess, I would say it stems from this change. Here is a comment about the same issue in another project.