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

cannot build with vite #1002

Closed
yungxiaomcc opened this issue Feb 10, 2022 · 7 comments
Closed

cannot build with vite #1002

yungxiaomcc opened this issue Feb 10, 2022 · 7 comments

Comments

@yungxiaomcc
Copy link

I use minio.js in my vue+vite project,but when i tried to create clinet ,occured error:

_stream_readable.js:48
Uncaught ReferenceError: global is not defined
at node_modules/readable-stream/lib/_stream_readable.js (_stream_readable.js:48:21)
at __require (chunk-OYVF2PGL.js?v=c8651b20:10:50)
at node_modules/readable-stream/readable-browser.js (readable-browser.js:1:28)
at __require (chunk-OYVF2PGL.js?v=c8651b20:10:50)
at node_modules/block-stream2/index.js (index.js:1:23)
at __require (chunk-OYVF2PGL.js?v=c8651b20:10:50)
at node_modules/minio/dist/main/minio.js (minio.js:21:43)
at __require (chunk-OYVF2PGL.js?v=c8651b20:10:50)
at dep:minio:1:16

and i find some useful infomation :

can you help me to aviod this problem ?(not very smooth english, sry ^-^)

@ilbertt
Copy link

ilbertt commented May 2, 2022

I'm getting the exact same error with vanilla-ts + vite

@yuhaozhai
Copy link

same

@prakashsvmx
Copy link
Member

vite does not import/export node defaults/polyfills of modules. please check the vite build config. We will also investigate further.

@cfmj
Copy link

cfmj commented Jun 19, 2022

same error

@prakashsvmx
Copy link
Member

Please refer to #1053 (comment) and make adjustments as per the module bundler documentation

@cfmj
Copy link

cfmj commented Sep 14, 2022

I'm getting the exact same error with vanilla-ts + vite

Have you solved the problem?

@lmq352489099
Copy link

Vite support Minio client now ? 0.0

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

No branches or pull requests

6 participants