minio-js icon indicating copy to clipboard operation
minio-js copied to clipboard

minio and node 21 import error.

Open WegDamit opened this issue 2 years ago • 1 comments

Not a bug, but an upgrade issue: Node 21 is new and broke "something"(tm) that minio needs...

Using node 21 in an svelte app with vite the import

import * as Minio from 'minio';

fails with node 21 but works in node 20.8

Error when evaluating SSR module /src/hooks.server.js: failed to import "minio"
|- TypeError: Cannot read properties of undefined (reading 'includes')
    at Object.<anonymous> (/.../node_modules/.pnpm/[email protected]/node_modules/browser-or-node/lib/index.js:19:133)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1201:32)
    at Module._load (node:internal/modules/cjs/loader:1017:12)

and a lot more internal modules more. when staring using pnpm run dev

WegDamit avatar Oct 23 '23 07:10 WegDamit

look like a bug of browser-or-node https://github.com/flexdinesh/browser-or-node/issues/28

trim21 avatar Oct 23 '23 08:10 trim21