I can't find anywhere in the javascript SDK, where debounce-promise is used. Are you using any other packages in your project that might be using that dependency? From personal experience though, that issue is sometimes fixed by adding polyfills to your project. See this forum thread for advice on a possible fix using polyfill.
Thanks for the feedback, I managed to find the require comes from the lib: genesys-cloud-streaming-client, which is referenced by the genesys-cloud-webrtc-sdk...
If I remove the genesys-cloud-webrtc-sdk package, then the build works as expected.
I have already added and configured the vite-plugin-node-polyfills, but this does not solve the issue...
Can you please use the same solution to fix the issue in genesys-cloud-streaming-client, what you have used in the Javascript SDK, version 163.0.0 to fix the similar issue?
As for using the same solution we used for version 163.0.0 of the javascript SDK, that most likely will not be possible. In the case of the javascript SDK we were lucky that we were able to find a solution without having to do a major rewrite of the SDK. It is unlikely we will be as lucky with the webRTC SDK without having to completely rebuild it from the ground up to no longer use builtin node modules.