supabase/storage-js

ExperimentalWarning: buffer.File is an experimental feature and might change at any time

hsuanweifu-sports-inference opened this issue · 2 comments

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Looks like uploadOrUpdate is triggering ExperimentalWarning error.

ERROR	(node:8) ExperimentalWarning: buffer.File is an experimental feature and might change at any time
    at emitExperimentalWarning (node:internal/util:274:11)
    at new File (node:internal/file:40:5)
    at makeEntry (node:internal/deps/undici/undici:4366:44)
    at _FormData.append (node:internal/deps/undici/undici:4258:23)
    at StorageFileApi.<anonymous> (/var/task/index.js:146080:20)
    at Generator.next (<anonymous>)
    at /var/task/index.js:146037:71
    at new Promise (<anonymous>)
    at __awaiter2 (/var/task/index.js:146019:14)
    at StorageFileApi.uploadOrUpdate (/var/task/index.js:146072:16)

To Reproduce

  const responds = client.from(l`bucketName`).upload(
    path,
    new Blob([JSON.stringify(data)], {
      type: "application/json",
    }),
    {
      upsert: true,
    }
  );

System information

  • Version of supabase-js: [2.5.5]
  • Version of Node.js: [18.19.2]

Hi @fenos, could you take a look? Any ways to mitigate this warning?

Running into this same problem here. Only direct usage of storage-js in our codebase is importing a FileObject type

Error message on our end appears consistent with the one originally mentioned

import { FileObject } from '@supabase/storage-js';

Is there any resolution? @thorwebdev