Skip to content

TypeError: Cannot find name DOMException  #1740

@Tarrowren

Description

@Tarrowren

Bug Description

Missing DOMException, Event and other types

Reproducible By

// tsconfrig.json
{
  "compilerOptions": {
    "module": "CommonJS",
    "moduleResolution": "Node",
    "target": "ES2020",
    "lib": ["ES2020"],
    "rootDir": "src",
    "outDir": "out",
    "strict": true,
    "esModuleInterop": true,
    "sourceMap": true
  },
  "include": ["src"]
}

run

tsc -p ./

Expected Behavior

Compilation passed

Logs & Screenshots

node_modules/undici/types/filereader.d.ts:5:41 - error TS2304: Cannot find name 'EventTarget'.

5 export declare class FileReader extends EventTarget {
                                          ~~~~~~~~~~~

node_modules/undici/types/filereader.d.ts:27:19 - error TS2304: Cannot find name 'DOMException'.

27   readonly error: DOMException | null
                     ~~~~~~~~~~~~

node_modules/undici/types/filereader.d.ts:37:44 - error TS2304: Cannot find name 'EventInit'.   

37 export interface ProgressEventInit extends EventInit {
                                              ~~~~~~~~~

node_modules/undici/types/filereader.d.ts:43:44 - error TS2304: Cannot find name 'Event'.       

43 export declare class ProgressEvent extends Event {
                                              ~~~~~

[11:46:51] Found 4 errors. Watching for file changes.

Environment

Node v16.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: help-wantedThis issue/pr is open for contributionsbugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions