Skip to content

Commit cf2a846

Browse files
icnocopCopilot
andcommitted
Fix 'Cannot find module eventsource' error in Electron.NET
Patch the bundled @microsoft/signalr v8.0.7 signalr.min.js to force the isNode getter to return false. The universal SignalR client detects Electron's renderer process as Node.js (via process.release.name) and unconditionally calls require('eventsource'), require('ws'), and other Node-only modules in the HttpConnection constructor. Since SwaggerUI always runs in a browser context, these Node.js code paths are never needed - the browser-native WebSocket, EventSource, and fetch APIs are used instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c58d750 commit cf2a846

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

0 commit comments

Comments
 (0)