oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.13k stars 2.67k forks source link

Minio SDK not working on Bun #13436

Open marcbejar opened 3 weeks ago

marcbejar commented 3 weeks ago

What version of Bun is running?

1.1.17

What platform is your computer?

Linux 6.5.0-44-generic x86_64 x86_64

What steps can reproduce the bug?

Install minio SDK: bun install --save minio

Import the package as in the docs: import * as Minio from 'minio'

Start developement server bun run dev

What is the expected behavior?

All packages loading normally as bun has node packages compatibility

What do you see instead?

` ✘ [ERROR] No matching export in "node-modules-polyfills:util" for import "promisify"

node_modules/minio/dist/esm/internal/async.mjs:5:9:
  5 │ import { promisify } from "util";
    ╵          ~~~~~~~~~

✘ [ERROR] No matching export in "node-modules-polyfills:fs" for import "promises"

node_modules/minio/dist/esm/internal/async.mjs:8:9:
  8 │ export { promises as fsp } from 'node:fs';
    ╵          ~~~~~~~~

✘ [ERROR] No matching export in "node-modules-polyfills:fs" for import "promises"

node_modules/minio/dist/esm/internal/async.mjs:8:9:
  8 │ export { promises as fsp } from 'node:fs';
    ╵          ~~~~~~~~

✘ [ERROR] No matching export in "node-modules-polyfills:fs" for import "promises"

node_modules/minio/dist/esm/internal/async.mjs:8:9:
  8 │ export { promises as fsp } from 'node:fs';
    ╵          ~~~~~~~~

✘ [ERROR] No matching export in "node-modules-polyfills:stream" for import "pipeline"

node_modules/minio/dist/esm/internal/request.mjs:1:9:
  1 │ import { pipeline } from "stream";
    ╵          ~~~~~~~~

`

Additional information

No response

kravetsone commented 2 weeks ago

It works for me

Tenki99 commented 20 hours ago

same problem with npm on windows