Open switchtan opened 2 years ago
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'.
npm run build
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[]; ~~~`
to fix it can use Yes adding "dom" to the lib array in tsconfig.json solved the problem the solution from URL
Yes adding "dom" to the lib array in tsconfig.json solved the problem
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:58 - error TS2304: Cannot find name 'Document'.
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:68 - error TS2304: Cannot find name 'Element'.
81 (elements: Element[], argument: number, not: boolean): Element[];
~~~`