node-sdks icon indicating copy to clipboard operation
node-sdks copied to clipboard

@livekit/rtc-node is not compatible with Cloudflare Workers

Open Shakahs opened this issue 1 year ago • 1 comments

@livekit/rtc-node relies on a NodeJS binary extension to do the actual WebRTC signaling.

Cloudflare Workers doesn't support binary extensions, so @livekit/rtc-node does not work on Cloudflare Workers.

Cloudflare does support WASM, WebRTC works in WASM (there are other libraries doing it), and the LiveKit WebRTC binaries are written in Rust, which can compile to WASM. So I think there is a path to resolving this by moving to WASM.

Shakahs avatar Sep 19 '24 09:09 Shakahs

I might be having the same issue on Deno Deploy.

The deployment failed: UNCAUGHT_EXCEPTION NotSupported: The operation is not supported at Object.Module._extensions..node (node:module:799:20) at Module.load (node:module:660:32) at Function.Module._load (node:module:532:12) at Module.require (node:module:679:19) at require (node:module:810:16) at Object.<anonymous> (file:///node_modules/.deno/@[email protected]/node_modules/@livekit/rtc-node/dist/napi/native.cjs:178:31) at Object.<anonymous> (file:///node_modules/.deno/@[email protected]/node_modules/@livekit/rtc-node/dist/napi/native.cjs:303:4) at Module._compile (node:module:743:34) at Object.loadCjs [as .cjs] (node:module:772:10) at Module.load (node:module:660:32)

elimydlarz avatar Mar 01 '25 08:03 elimydlarz

Yeah, I'm running into the same problem. Really hoping LiveKit adds support for Cloudflare Workers or Durable Objects soon. That's pretty much the only thing stopping me from using it right now.

athif23 avatar Apr 30 '25 03:04 athif23

This is an issue with Cloudflare workers, which does not support native libraries. LiveKit agents depends on our Rust SDK. We'll not be able to address this from our end.

Durable objects should not have any conflicts with agents. you are welcome to use them here.

We do have a cloud hosting product that's currently in private beta. you can sign up here or explore alternative deployment options.

davidzhao avatar Apr 30 '25 07:04 davidzhao