Skip to content

[Question] TypeScript can't compile #2659

Closed
@luka-dev

Description

@luka-dev

Hi, i am making 'task' server, based on playwright and using TypeScript in my project.

Problem is - when i add any import from playwright, 'tsc' command start pulling into me alot of errors.

> tsc
node_modules / playwright / types / types.d.ts: 41: 33 - error TS2304: Cannot find name 'Node'.
41 type SmartHandle = T extends Node? ElementHandle : JSHandle ;
~~~~

node_modules / playwright / types / types.d.ts: 42: 42 - error TS2304: Cannot find name 'HTMLElementTagNameMap'.

42 type ElementHandleForTag = ElementHandle <HTMLElementTagNameMap [K]>;
~~~~~~~~~~~~~~~~~~~~ ~

node_modules / playwright / types / types.d.ts: 42: 81 - error TS2304: Cannot find name 'HTMLElementTagNameMap'.

42 type ElementHandleForTag = ElementHandle <HTMLElementTagNameMap [K]>;
~~~~~~~~~~~~~~~~~~~~ ~

And, much more lines .....
May some body know, what is happend? And how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions