Problem with using minio and k6

I am using k6 (using typescript language ) and want to upload or download files on minio server but facing challenges out of which most of the challenges I am able to solve but the major issue I am facing is of “ReferenceError: process is not defined”.

In my webpack.config.js I have used all the solutions I am able to find on internet
=> process: require.resolve(‘process/browser’),
=> plugins: [
new CleanWebpackPlugin({
process: ‘process/browser’,
}),
],

but still getting the same error. Can someone please help to fix this issue.
I am using Minio Library to interact with Minio

Hi there, welcome to the forum :slightly_smiling_face:

I see you already received a reply on your minio-js issue. To confirm this from the k6 perspective: k6 does not run or depend on NodeJS in any way. See the documentation. The process API is exclusive to NodeJS, and doesn’t exist in k6.

There was apparently a Browserified minio-js port, which typically does work in k6, but it’s been discontinued, and Minio authors don’t recommend using it. EDIT: Although it seems to be possible to use it from the browser with a custom build. These examples are for React, but presumably it could run without it as well(?).

Have you tried using our AWS JS library instead? You should be able to interact with Minio using the S3Client. I would try this first before doing any custom minio-js builds.

Hi,

Thanks for your reply. Can you please help with some example how aws lib can be used to connect with minio lib as we have hosted minio on our own kubernetes cluster

Ah, sorry, I didn’t realize the k6 S3 library was AWS specific. We can continue this discussion in the k6-jslib-aws issue, as there’s no reason it shouldn’t support any S3-compatible API.

In the meantime, if this is urgent, you can try building a browser version of minio-js.

Hi,

I think it will be fine to continue on github itself. The changes in ceph is what i think is needed (setting up endpoint) and i am not sure for rgw property.