TeamVis Self-Host-Bundle v0.31.0
This commit is contained in:
@@ -78,6 +78,18 @@ async function readPassword() {
|
||||
});
|
||||
}
|
||||
|
||||
// Node < 22 hat kein globales WebSocket; supabase-js v2 verlangt im
|
||||
// Konstruktor (Realtime-Init) eins. Wir nutzen kein Realtime — ein Polyfill
|
||||
// aus "ws" genügt, damit createClient nicht wirft.
|
||||
if (typeof globalThis.WebSocket === "undefined") {
|
||||
try {
|
||||
const { default: WS } = await import("ws");
|
||||
globalThis.WebSocket = WS;
|
||||
} catch {
|
||||
/* ws fehlt → createClient wirft mit klarer Meldung; npm install hilft */
|
||||
}
|
||||
}
|
||||
|
||||
const supabase = createClient(supabaseUrl, serviceKey, {
|
||||
auth: { persistSession: false },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user