sanity-io/client

Cannot find name 'File' error after v5 upgrade (in Node)

kemalcany opened this issue · 0 comments

Hi Sanity team

A similar issue to this one happens after the 5.2.1 update (console below)

In Node if the tsconfig / lib options doesn't include 'dom' option (which can happen if you are using this package on server side)

node_modules/.pnpm/@sanity+client@5.2.1/node_modules/@sanity/client/dist/index.d.ts:47:11 - error TS2304: Cannot find name 'File'.

47     body: File | Blob | Buffer | NodeJS.ReadableStream,
             ~~~~

node_modules/.pnpm/@sanity+client@5.2.1/node_modules/@sanity/client/dist/index.d.ts:59:11 - error TS2304: Cannot find name 'File'.

59     body: File | Blob | Buffer | NodeJS.ReadableStream,
             ~~~~

node_modules/.pnpm/@sanity+client@5.2.1/node_modules/@sanity/client/dist/index.d.ts:71:11 - error TS2304: Cannot find name 'File'.

71     body: File | Blob | Buffer | NodeJS.ReadableStream,
             ~~~~

node_modules/.pnpm/@sanity+client@5.2.1/node_modules/@sanity/client/dist/index.d.ts:589:11 - error TS2304: Cannot find name 'File'.

589     body: File | Blob | Buffer | NodeJS.ReadableStream,
              ~~~~

node_modules/.pnpm/@sanity+client@5.2.1/node_modules/@sanity/client/dist/index.d.ts:605:11 - error TS2304: Cannot find name 'File'.

605     body: File | Blob | Buffer | NodeJS.ReadableStream,
              ~~~~

node_modules/.pnpm/@sanity+client@5.2.1/node_modules/@sanity/client/dist/index.d.ts:621:11 - error TS2304: Cannot find name 'File'.

621     body: File | Blob | Buffer | NodeJS.ReadableStream,