Skip to content

@remix-run/[email protected] + [email protected] = 'bytes' is missing in type 'NodeOnDiskFile' #10264

Open
@AviVahl

Description

@AviVahl

Reproduction

mkdir test-remix
cd test-remix
npm init -y
npm i @remix-run/node typescript @types/node@22
npx tsc --init --skipLibCheck false
echo "export * from '@remix-run/node';" > a.ts
npx tsc --noEmit

# see type error

System Info

Not system-specific.
Happens on projects with `skipLibCheck` set to false.

Used Package Manager

npm

Expected Behavior

No type errors

Actual Behavior

node_modules/@remix-run/node/dist/upload/fileUploadHandler.d.ts:47:22 - error TS2420: Class 'NodeOnDiskFile' incorrectly implements interface 'Omit<File, "constructor">'.
  Property 'bytes' is missing in type 'NodeOnDiskFile' but required in type 'Omit<File, "constructor">'.

47 export declare class NodeOnDiskFile implements Omit<File, "constructor"> {
                        ~~~~~~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:3442:5
    3442     bytes(): Promise<Uint8Array>;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    'bytes' is declared here.


Found 1 error in node_modules/@remix-run/node/dist/upload/fileUploadHandler.d.ts:47

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions