Add Icons to project Material Table error - node.js

I`m try to do this https://github.com/mbrn/material-table but I get error. I think there is a problem because I use TSX not JSX? do you know how to fix?
No overload matches this call.
Overload 1 of 2, '(props: { component: ElementType<any>; } & { children?: ReactNode; color?: "primary" | "secondary" | "disabled" | "error" | "inherit" | "action" | undefined; fontSize?: "inherit" | ... 3 more ... | undefined; htmlColor?: string | undefined; shapeRendering?: string | undefined; titleAccess?: string | undefined; viewBox?: string | undefined; } & CommonProps<...> & Pick<...>): Element', gave the following error.
Property 'component' is missing in type '{ ref: ((instance: unknown) => void) | MutableRefObject<unknown> | null; children?: ReactNode; }' but required in type '{ component: ElementType<any>; }'.
Overload 2 of 2, '(props: DefaultComponentProps<SvgIconTypeMap<{}, "svg">>): Element', gave the following error.
Type '((instance: unknown) => void) | MutableRefObject<unknown> | null' is not assignable to type '((instance: SVGSVGElement | null) => void) | RefObject<SVGSVGElement> | null | undefined'.
Type 'MutableRefObject<unknown>' is not assignable to type '((instance: SVGSVGElement | null) => void) | RefObject<SVGSVGElement> | null | undefined'.
Type 'MutableRefObject<unknown>' is not assignable to type 'RefObject<SVGSVGElement>'.ts(2769)
OverridableComponent.d.ts(17, 7): 'component' is declared here.
and here
No overload matches this call.
Overload 1 of 2, '(props: Readonly<MaterialTableProps<{ name: string; surname: string; birthYear: number; birthCity: number; }>>): MaterialTable<{ name: string; surname: string; birthYear: number; birthCity: number; }>', gave the following error.
Type '{ Add: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>; Check: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>; Clear: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>; ... 13 more ...; ViewColumn: React.ForwardRefExoticComponent<...>; }' is not assignable to type 'Icons'.
The types of 'Add.defaultProps' are incompatible between these types.
Type 'Partial<RefAttributes<unknown>> | undefined' is not assignable to type 'Partial<RefAttributes<SVGSVGElement>> | undefined'.
Type 'Partial<RefAttributes<unknown>>' is not assignable to type 'Partial<RefAttributes<SVGSVGElement>>'.
Types of property 'ref' are incompatible.
Type '((instance: unknown) => void) | RefObject<unknown> | null | undefined' is not assignable to type '((instance: SVGSVGElement | null) => void) | RefObject<SVGSVGElement> | null | undefined'.

try this
forwardRef<SVGSVGElement>
in the icons
or
import Icons like this:
import MaterialTable, { Icons } from 'material-table'
const tableIcons: Icons = {...}

Related

GraphQL build issue: Interface 'ExecutionResult<TData>' incorrectly extends interface 'ExecutionResult'

I am building a GraphQL lambda server with typescript#4.9.4 graphql#15.8.0 apollo-server-lambda#2.19.0, but got the following error:
node_modules/apollo-link/lib/types.d.ts(5,18): error TS2430: Interface 'ExecutionResult<TData>' incorrectly extends interface 'ExecutionResult<{ [key: string]: any; }, { [key: string]: any; }>'
Types of property 'data' are incompatible.
Type 'TData | null | undefined' is not assignable to type '{ [key: string]: any; } | null | undefined'.
Type 'TData' is not assignable to type '{ [key: string]: any; } | null | undefined'.
Type 'TData' is not assignable to type '{ [key: string]: any; }'.
Any suggestions on how to fix this issue?
Have tried to install different graphql versions ^14.0.0 ^16.0.0? They did not work.
package.json dependencies:
"#aws-sdk/client-kms": "^3.16.0",
"apollo-server-lambda": "2.19.0",
"aws-embedded-metrics": "^2.0.4",
"axios": "^0.24.0",
"axios-retry": "^3.2.5",
"graphql": "^15.5.0",

Getting typescript errors while deploying the node app to heroku

I have been trying to deploy my typescript based node server to heroku but getting the following error while deployment
-----> Build
Running build
> autoscan-back-end#1.0.0 build
> rimraf dist && tsc
src/services/notification/notification.service.ts(46,37): error TS2322: Type 'string | ObjectId' is not assignable to type 'Condition<string>'.
Type 'ObjectId' is not assignable to type 'Condition<string>'.
src/services/report/report.service.ts(53,35): error TS2769: No overload matches this call.
Overload 1 of 3, '(callback?: Callback<ReportType[]>): Query<ReportType[], ReportType, {}, ReportType>', gave the following error.
Argument of type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to parameter of type 'Callback<ReportType[]>'.
Type '{ _id?: string; admin: string | ObjectId; status?: string; containsDublicates?: boolean; stickers?: [ObjectId]; }' provides no match for the signature '(error: NativeError, result: ReportType[]): void'.
Overload 2 of 3, '(filter: FilterQuery<ReportType>, callback?: Callback<ReportType[]>): Query<ReportType[], ReportType, {}, ReportType>', gave the following error.
Argument of type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to parameter of type 'FilterQuery<ReportType>'.
Type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to type '{ _id?: any; admin?: Condition<string>; status?: Condition<string>; containsDublicates?: Condition<boolean>; stickers?: Condition<[ObjectId]>; ... 55 more ...; validateSync?: Condition<...>; }'.
Types of property 'admin' are incompatible.
Type 'string | ObjectId' is not assignable to type 'Condition<string>'.
Type 'ObjectId' is not assignable to type 'Condition<string>'.
Overload 3 of 3, '(filter: FilterQuery<ReportType>, projection?: any, options?: QueryOptions, callback?: Callback<ReportType[]>): Query<...>', gave the following error.
Argument of type '{ _id?: string; admin: string | Types.ObjectId; status?: string; containsDublicates?: boolean; stickers?: [Types.ObjectId]; }' is not assignable to parameter of type 'FilterQuery<ReportType>'.
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck, please submit a ticket so we can help:
https://help.heroku.com/
Love,
Heroku
! Push rejected, failed to compile Node.js app.
! Push failed
the project is running smoothly without any error locally, getting this on heroku only
Actually ts was checking the query response from mongodb, which was ignored in other functions but not these.
So I just added //#ts-ignore before the line 53 and 46 to ingore just like other query functions

Error when trying to upload G-Cloud-Function

i got a problem when uploading my Cloud-Functions to Firebase.
Using Typescript i need to do some XML-Parsing and therefore i need a package called xmldom-ts, but it shows me this abstract error:
tsc
node_modules/typescript/lib/lib.dom.d.ts:6059:11 - error TS2320: Interface 'HTMLAnchorElement' cannot simultaneously extend types 'HTMLElement' and 'HTMLHyperlinkElementUtils'.
Named property 'toString' of types 'HTMLElement' and 'HTMLHyperlinkElementUtils' are not identical.
6059 interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils {
~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:6168:11 - error TS2320: Interface 'HTMLAreaElement' cannot simultaneously extend types 'HTMLElement' and 'HTMLHyperlinkElementUtils'.
Named property 'toString' of types 'HTMLElement' and 'HTMLHyperlinkElementUtils' are not identical.
6168 interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils {
~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:24:5 - error TS2416: Property 'createElement' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(tagName: string) => ElementImpl' is not assignable to type '(_tagName: string) => HTMLElement'.
Property 'autofocus' is missing in type 'ElementImpl' but required in type 'HTMLElement'.
24 createElement(tagName: string): ElementImpl;
~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:7989:5
7989 autofocus: boolean;
~~~~~~~~~
'autofocus' is declared here.
node_modules/xmldom-ts/dist/types/document.d.ts:25:5 - error TS2416: Property 'createDocumentFragment' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '() => DocumentFragmentImpl' is not assignable to type '() => DocumentFragment'.
Call signature return types 'DocumentFragmentImpl' and 'DocumentFragment' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
25 createDocumentFragment(): DocumentFragmentImpl;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:26:5 - error TS2416: Property 'createTextNode' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(data: string) => TextImpl' is not assignable to type '(_data: string) => Text'.
Call signature return types 'TextImpl' and 'Text' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
26 createTextNode(data: string): TextImpl;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:27:5 - error TS2416: Property 'createComment' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(data: string) => CommentImpl' is not assignable to type '(_data: string) => Comment'.
Call signature return types 'CommentImpl' and 'Comment' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
27 createComment(data: string): CommentImpl;
~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:28:5 - error TS2416: Property 'createCDATASection' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(data: string) => CDATASectionImpl' is not assignable to type '(_data: string) => CDATASection'.
Call signature return types 'CDATASectionImpl' and 'CDATASection' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
28 createCDATASection(data: string): CDATASectionImpl;
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:29:5 - error TS2416: Property 'createProcessingInstruction' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(target: string, data: string) => ProcessingInstructionImpl' is not assignable to type '(_target: string, _data: string) => ProcessingInstruction'.
Property 'sheet' is missing in type 'ProcessingInstructionImpl' but required in type 'ProcessingInstruction'.
29 createProcessingInstruction(target: string, data: string): ProcessingInstructionImpl;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:9677:14
9677 readonly sheet: CSSStyleSheet | null;
~~~~~
'sheet' is declared here.
node_modules/xmldom-ts/dist/types/document.d.ts:30:5 - error TS2416: Property 'createAttribute' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(name: string) => AttrImpl' is not assignable to type '(_name: string) => Attr'.
Call signature return types 'AttrImpl' and 'Attr' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
30 createAttribute(name: string): AttrImpl;
~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:31:5 - error TS2416: Property 'createEntityReference' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(name: string) => EntityReferenceImpl' is not assignable to type '(_name: string) => Node'.
Call signature return types 'EntityReferenceImpl' and 'Node' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
31 createEntityReference(name: string): EntityReferenceImpl;
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/document.d.ts:33:5 - error TS2416: Property 'createAttributeNS' in type 'DocumentImpl' is not assignable to the same property in base type 'DummyDocument'.
Type '(namespaceURI: string, qualifiedName: string) => AttrImpl' is not assignable to type '(_namespaceURI: string, _qualifiedName: string) => Attr'.
Type 'AttrImpl' is not assignable to type 'Attr'.
33 createAttributeNS(namespaceURI: string, qualifiedName: string): AttrImpl;
~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dom-implementation.d.ts:12:5 - error TS2416: Property 'createDocument' in type 'DOMImplementationImpl' is not assignable to the same property in base type 'DummyDOMIMplementation'.
Type '(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null) => DocumentImpl' is not assignable to type '(_namespaceURI: string | null, _qualifiedName: string | null, _doctype: DocumentType | null) => Document'.
Call signature return types 'DocumentImpl' and 'Document' are incompatible.
The types of 'defaultView' are incompatible between these types.
Type 'Window | null' is not assignable to type '(Window & typeof globalThis) | null'.
Type 'Window' is not assignable to type 'Window & typeof globalThis'.
Type 'Window' is not assignable to type 'typeof globalThis'.
12 createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): DocumentImpl;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dom-implementation.d.ts:13:5 - error TS2416: Property 'createDocumentType' in type 'DOMImplementationImpl' is not assignable to the same property in base type 'DummyDOMIMplementation'.
Type '(qualifiedName: string, publicId: string, systemId: string) => DocumentTypeImpl' is not assignable to type '(_qualifiedName: string, _publicId: string, _systemId: string) => DocumentType'.
Call signature return types 'DocumentTypeImpl' and 'DocumentType' are incompatible.
The types of 'previousSibling' are incompatible between these types.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
13 createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentTypeImpl;
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-attr.d.ts:3:31 - error TS2420: Class 'DummyAttr' incorrectly implements interface 'Attr'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare abstract class DummyAttr extends NodeImpl implements Attr {
~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-cdata-section.d.ts:3:22 - error TS2420: Class 'DummyCDATASection' incorrectly implements interface 'CDATASection'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyCDATASection extends CharacterDataImpl implements CDATASection {
~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-character-data.d.ts:3:31 - error TS2420: Class 'DummyCharacterData' incorrectly implements interface 'CharacterData'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare abstract class DummyCharacterData extends NodeImpl implements CharacterData {
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-comment.d.ts:3:22 - error TS2420: Class 'DummyComment' incorrectly implements interface 'Comment'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyComment extends CharacterDataImpl implements Comment {
~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document-fragment.d.ts:3:22 - error TS2420: Class 'DummyDocumentFragment' incorrectly implements interface 'DocumentFragment'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyDocumentFragment extends NodeImpl implements DocumentFragment {
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document-type.d.ts:3:22 - error TS2420: Class 'DummyDocumentType' incorrectly implements interface 'DocumentType'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyDocumentType extends NodeImpl implements DocumentType {
~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document.d.ts:126:14 - error TS2416: Property 'defaultView' in type 'DummyDocument' is not assignable to the same property in base type 'Document'.
Type 'Window | null' is not assignable to type '(Window & typeof globalThis) | null'.
Type 'Window' is not assignable to type 'Window & typeof globalThis'.
Type 'Window' is missing the following properties from type 'typeof globalThis': globalThis, eval, parseInt, parseFloat, and 721 more.
126 readonly defaultView: Window | null;
~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-document.d.ts:147:14 - error TS2416: Property 'onreadystatechange' in type 'DummyDocument' is not assignable to the same property in base type 'Document'.
Type '((this: Document, ev: ProgressEvent<EventTarget>) => any) | null' is not assignable to type '((this: Document, ev: Event) => any) | null'.
Type '(this: Document, ev: ProgressEvent<EventTarget>) => any' is not assignable to type '(this: Document, ev: Event) => any'.
Types of parameters 'ev' and 'ev' are incompatible.
Type 'Event' is missing the following properties from type 'ProgressEvent<EventTarget>': lengthComputable, loaded, total
147 readonly onreadystatechange: ((this: Document, ev: ProgressEvent) => any) | null;
~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:148:5 - error TS2416: Property 'getBoundingClientRect' in type 'DummyElement' is not assignable to the same property in base type 'Element'.
Type '() => DOMRect | ClientRect' is not assignable to type '() => DOMRect'.
Type 'DOMRect | ClientRect' is not assignable to type 'DOMRect'.
Type 'ClientRect' is missing the following properties from type 'DOMRect': x, y, toJSON
148 getBoundingClientRect(): ClientRect | DOMRect;
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:148:5 - error TS2416: Property 'getBoundingClientRect' in type 'DummyElement' is not assignable to the same property in base type 'HTMLElement'.
Type '() => DOMRect | ClientRect' is not assignable to type '() => DOMRect'.
148 getBoundingClientRect(): ClientRect | DOMRect;
~~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:149:5 - error TS2416: Property 'getClientRects' in type 'DummyElement' is not assignable to the same property in base type 'Element'.
Type '() => ClientRectList | DOMRectList' is not assignable to type '() => DOMRectList'.
Type 'ClientRectList | DOMRectList' is not assignable to type 'DOMRectList'.
Type 'ClientRectList' is not assignable to type 'DOMRectList'.
The types returned by 'item(...)' are incompatible between these types.
Type 'ClientRect' is not assignable to type 'DOMRect'.
149 getClientRects(): ClientRectList | DOMRectList;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-element.d.ts:149:5 - error TS2416: Property 'getClientRects' in type 'DummyElement' is not assignable to the same property in base type 'HTMLElement'.
Type '() => ClientRectList | DOMRectList' is not assignable to type '() => DOMRectList'.
149 getClientRects(): ClientRectList | DOMRectList;
~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-entity-reference.d.ts:3:22 - error TS2420: Class 'DummyEntityReference' incorrectly implements interface 'Node'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyEntityReference extends NodeImpl implements EntityReference {
~~~~~~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-node.d.ts:8:14 - error TS2416: Property 'previousSibling' in type 'DummyNode' is not assignable to the same property in base type 'Node'.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is missing the following properties from type 'ChildNode': after, before, remove, replaceWith
8 abstract previousSibling: Node | null;
~~~~~~~~~~~~~~~
node_modules/xmldom-ts/dist/types/dummy/dummy-processing-instruction.d.ts:3:31 - error TS2420: Class 'DummyProcessingInstruction' incorrectly implements interface 'ProcessingInstruction'.
Property 'sheet' is missing in type 'DummyProcessingInstruction' but required in type 'ProcessingInstruction'.
3 export declare abstract class DummyProcessingInstruction extends CharacterDataImpl implements ProcessingInstruction {
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typescript/lib/lib.dom.d.ts:9677:14
9677 readonly sheet: CSSStyleSheet | null;
~~~~~
'sheet' is declared here.
node_modules/xmldom-ts/dist/types/dummy/dummy-text.d.ts:3:22 - error TS2420: Class 'DummyText' incorrectly implements interface 'Text'.
Types of property 'previousSibling' are incompatible.
Type 'Node | null' is not assignable to type 'ChildNode | null'.
Type 'Node' is not assignable to type 'ChildNode'.
3 export declare class DummyText extends CharacterDataImpl implements Text {
~~~~~~~~~
Found 29 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! functions# build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the functions# build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Any idea why i get this error? My package.json:
"dependencies": {
"es6-promise-pool": "^2.5.0",
"firebase-admin": "^8.12.1",
"firebase-functions": "^3.7.0",
"stripe": "^8.67.0",
"xmldom-ts": "^0.3.1",
"xpath-ts": "^1.3.13"
},
npm tsc and vscode show no problems / warnings & i tried npm reinstall multiple times.
Removing xmldom-ts from packages solved the Problem
npm uninstall xmldom-ts

Trying to generate production version of Express with Typescript

I'm getting this error below when I run: npm run clear && tsc -P ./tsconfig.app.json && npm run post:build or tsc -p .
node version: v12.13.0
npm: v6.14.2
Express: 4
Does someone already have the same problem?
> tsc -p .
node_modules/#types/readable-stream/index.d.ts:14:15 - error TS2417: Class static side 'typeof _Readable' incorrectly extends base class static side 'typeof Readable'.
The types of '(new Stream.Readable.Duplex(...))._destroy' are incompatible between these types.
Type '(err: Error | null, callback: (error: Error | null) => void) => void' is not assignable to type '(error: Error | null, callback: (error?: Error | undefined) => void) => void'.
Types of parameters 'callback' and 'callback' are incompatible.
Types of parameters 'error' and 'error' are incompatible.
Type 'Error | null' is not assignable to type 'Error | undefined'.
Type 'null' is not assignable to type 'Error | undefined'.
14 declare class _Readable extends stream.Readable {
~~~~~~~~~
node_modules/#types/readable-stream/index.d.ts:88:9 - error TS2416: Property '_destroy' in type 'Duplex' is not assignable to the same property in base type 'Duplex'.
Type '(err: Error | null, callback: (error: Error | null) => void) => void' is not assignable to type '(error: Error | null, callback: (error?: Error | undefined) => void) => void'.
Types of parameters 'callback' and 'callback' are incompatible.
Types of parameters 'error' and 'error' are incompatible.
Type 'Error | null' is not assignable to type 'Error | undefined'.
Type 'null' is not assignable to type 'Error | undefined'.
88 _destroy(err: Error | null, callback: (error: Error | null) => void): void;
~~~~~~~~
node_modules/#types/readable-stream/index.d.ts:88:9 - error TS2416: Property '_destroy' in type 'Duplex' is not assignable to the same property in base type 'Writable'.
Type '(err: Error | null, callback: (error: Error | null) => void) => void' is not assignable to type '(error: Error | null, callback: (error?: Error | undefined) => void) => void'.
Types of parameters 'callback' and 'callback' are incompatible.
Types of parameters 'error' and 'error' are incompatible.
Type 'Error | null' is not assignable to type 'Error | undefined'.
Type 'null' is not assignable to type 'Error | undefined'.
88 _destroy(err: Error | null, callback: (error: Error | null) => void): void;
~~~~~~~~
node_modules/#types/readable-stream/index.d.ts:88:9 - error TS2416: Property '_destroy' in type 'Duplex' is not assignable to the same property in base type '_Readable'.
Type '(err: Error | null, callback: (error: Error | null) => void) => void' is not assignable to type '(error: Error | null, callback: (error?: Error | undefined) => void) => void'.
Types of parameters 'callback' and 'callback' are incompatible.
Types of parameters 'error' and 'error' are incompatible.
Type 'Error | null' is not assignable to type 'Error | undefined'.
Type 'null' is not assignable to type 'Error | undefined'.
88 _destroy(err: Error | null, callback: (error: Error | null) => void): void;
~~~~~~~~
node_modules/#types/readable-stream/index.d.ts:102:11 - error TS2720: Class '_Readable.PassThrough' incorrectly implements class 'import("stream").PassThrough'. Did you mean to extend 'import("stream").PassThrough' and inherit its members as a subclass?
Types of property '_destroy' are incompatible.
Type '(err: Error | null, callback: (error: Error | null) => void) => void' is not assignable to type '(error: Error | null, callback: (error?: Error | undefined) => void) => void'.
Types of parameters 'callback' and 'callback' are incompatible.
Types of parameters 'error' and 'error' are incompatible.
Type 'Error | null' is not assignable to type 'Error | undefined'.
Type 'null' is not assignable to type 'Error | undefined'.
102 class PassThrough extends Transform implements stream.PassThrough {
~~~~~~~~~~~
node_modules/#types/readable-stream/index.d.ts:138:18 - error TS2749: 'StringDecoder' refers to a value, but is being used as a type here.
138 decoder: StringDecoder | null;
~~~~~~~~~~~~~
node_modules/#types/readable-stream/index.d.ts:164:11 - error TS2720: Class '_Readable.Transform' incorrectly implements class 'import("stream").Transform'. Did you mean to extend 'import("stream").Transform' and inherit its members as a subclass?
Types of property '_destroy' are incompatible.
Type '(err: Error | null, callback: (error: Error | null) => void) => void' is not assignable to type '(error: Error | null, callback: (error?: Error | undefined) => void) => void'.
Types of parameters 'callback' and 'callback' are incompatible.
Types of parameters 'error' and 'error' are incompatible.
Type 'Error | null' is not assignable to type 'Error | undefined'.
Type 'null' is not assignable to type 'Error | undefined'.
164 class Transform extends Duplex implements stream.Transform {
~~~~~~~~~
Found 7 errors.
Try adding
"#types/node": "^12.12.7"
to devDependencies in package.json. then,
npm install
It worked for me. Cheers!!

ConsumerGroup consumerOptions Configuration error #types/kafka-node

I'm trying to use consumerGroup instead of HighLevelConsumer in a typescript project, but I'm not able to configure consumerOptions for consumerGroup.
I am getting the following error when I assign
1) fromOffset: 'earliest'
Argument of type '{ autoCommit: boolean; fetchMaxBytes: number;
fetchMaxWaitMs: number; fromOffset: string; groupId...' is not
assignable to parameter of type 'ConsumerGroupOptions'. Types of
property 'fromOffset' are incompatible. Type 'string' is not
assignable to type '"earliest" | "latest" | "none"'.
2) protocol: ['roundrobin']
Argument of type '{ autoCommit: boolean; fetchMaxBytes: number;
fetchMaxWaitMs: number; protocol: string[]; groupId...' is not
assignable to parameter of type 'ConsumerGroupOptions'. Types of
property 'protocol' are incompatible. Type 'string[]' is not
assignable to type '("roundrobin" | "range" |
CustomPartitionAssignmentProtocol)[]'. Type 'string' is not assignable
to type '"roundrobin" | "range" | CustomPartitionAssignmentProtocol'.
3) outOfRangeOffset: 'earliest'
Argument of type '{ autoCommit: boolean; fetchMaxBytes: number;
fetchMaxWaitMs: number; outOfRangeOffset: string; g...' is not
assignable to parameter of type 'ConsumerGroupOptions'. Types of
property 'outOfRangeOffset' are incompatible. Type 'string' is not
assignable to type '"earliest" | "latest" | "none"'.
Environment details:
Node version: v8.11.1
Kafka-node version: v2.6.1
types/kafka-node: v2.0.6
Can anyone help me understand where I am going wrong? Thanks in advance.

Resources