hi there when executing livekit with docker alpine...
# server-api
b
hi there when executing livekit with docker alpine getting this error Error: Cannot find module '@livekit/rtc-node-linux-x64-musl' using
Copy code
"@livekit/rtc-node": "^0.13.11",
using node:20-alpine
Copy code
FROM node:20-alpine
anything that i need to install in order to make it work?
s
I'm having this exact same issue with node 22 alpine. Were you able to get it resolved? If not, some support from the team would be greatly appreciated The package referenced in the error message isn't even installable via npm so its a pretty difficult one to solve given the lack of information
t
Hi folks 👋 That suffix
-musl
is an artifact of how @livekit/rtc-node dynamically loads native binaries depending on your OS and architecture. If you're getting that message, the OSes you're using are musl-based (compared to glibc-based) and we don't publish musl-based binaries (due to impelementation details related to libwebrtc). So the recommendation here would be to use glibc-based images like Ubuntu (if looking for an OS) or node:20-slim (our recommendation from the nodejs example Dockerfile)
s
cool thanks! i ended up digging into the github repo for the package last night and found the piece of code where that was happening. was able to solve the issue by switching to running on a gnu-based distribution of node yesterday and that ended up fixing it, but it took quite a bit of debugging and wasn't very obvious without knowing to dig into the source repo I would suggest a more descriptive error there if the intention is to not publish musl-based libraries. Based on the code, one would think that those should exist given the fact that it is written the exact same as for gnu-based. There is pretty much nothing there indicating that it wouldn't work and you only figure this out at runtime
could maybe just throw an error in those cases with a descriptive message that musl libraries aren't supported? the failing require error makes it seem like it should exist when it sounds like that isn't the intention
t
Excellent point Sajan, would you mind submitting an issue on the repo?
s
sure, just filed!
t
Thanks! Would you mind linking the issue?
s