unfortunately I don’t think this library will work with k6. The main reason is the lack of an event loop in k6, so while a lot of NPM modules will work after being run through Browserify, modules that rely on async/await will not. Implementing an event loop in k6 is on the roadmap, but not in the near future.
For your setPrototypeOf error see this comment on a related issue, where the suggested fix is to use an alternative polyfill. So you can try loading that module manually and let us know if it fixes it.
Besides this, is there a particular reason you need to use crypto2? k6 has a built-in crypto library you could use instead if it fits your use case.
Yeah, I will try it out. However, I have some workaround to bypass this issue which i can hard coded the encrypted password in data file, somehow, it works well even different login account use the same “password”.