RPC
RPC copied to clipboard
Client initialisation throws "setTimeout2 is not a function"
On latest nodeJS and Angular TS
this.rpc = new RPC.Client({ transport: 'ipc' });
this.rpc.login({ clientId: discordConfig.clientId }).catch(console.error);
The login is catching : "TypeError: setTimeout2 is not a function" There is also a warning "browser-external:timers:9 Module "timers" has been externalized for browser compatibility. Cannot access"
The warning comes from Vite. I'm running into the same problem. After running vite build and hosting the resulting bundle in an nginx container, there's a different error message, that _ is not a function. Did you ever solve this issue?