Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AviVahl opened this issue Nov 22, 2024 · 1 comment

Comments

@AviVahl
Copy link

AviVahl commented Nov 22, 2024

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
@RobertGemmaJr
Copy link

+1 on this, just did an npm upgrade and am getting the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants