devalpha-node icon indicating copy to clipboard operation
devalpha-node copied to clipboard

error TS2304: Cannot find name 'Element'.

Open switchtan opened this issue 4 years ago • 1 comments

while run npm run build will show error like below `../../node_modules/@types/sizzle/index.d.ts:19:53 - error TS2304: Cannot find name 'Element'.

19 matches(selector: string, elements: Element[]): Element[]; ~~~~~~~

../../node_modules/@types/sizzle/index.d.ts:41:48 - error TS2304: Cannot find name 'Element'.

41 (match: RegExpMatchArray, context: Element | Document, isXML: boolean): Element[] | void; ~~~~~~~

../../node_modules/@types/sizzle/index.d.ts:41:58 - error TS2304: Cannot find name 'Document'.

41 (match: RegExpMatchArray, context: Element | Document, isXML: boolean): Element[] | void; ~~~~~~~~

../../node_modules/@types/sizzle/index.d.ts:41:85 - error TS2304: Cannot find name 'Element'.

41 (match: RegExpMatchArray, context: Element | Document, isXML: boolean): Element[] | void; ~~~~~~~

../../node_modules/@types/sizzle/index.d.ts:73:20 - error TS2304: Cannot find name 'Element'.

73 (elem: Element): boolean; ~~~~~~~

../../node_modules/@types/sizzle/index.d.ts:81:24 - error TS2304: Cannot find name 'Element'.

81 (elements: Element[], argument: number, not: boolean): Element[]; ~~~~~~~

../../node_modules/@types/sizzle/index.d.ts:81:68 - error TS2304: Cannot find name 'Element'.

81 (elements: Element[], argument: number, not: boolean): Element[]; ~~~~~~~`

switchtan avatar Oct 15 '21 09:10 switchtan

to fix it can use Yes adding "dom" to the lib array in tsconfig.json solved the problem the solution from URL

switchtan avatar Oct 15 '21 09:10 switchtan