Ask coding questions

← Back to all posts
Discord.js Canvas error: libuuid.so.1: cannot open shared object file: No such file or directory
h
ASOwnerYT

Hello,
I'm trying to use the npm package Canvas with my Discord bot (Node.js 16 running with Nix on my Replit), and when I run my bot I get the following error:

I install Canvas by running this command in the shell: npm install canvas

Voters
ASOwnerYT
Comments
hotnewtop
SixBeeps

What version of canvas are you running? I'm running 2.8.0 on a Nodejs Repl and it seems to be working for me. Also, try installing it through the packages tab.

ASOwnerYT

@SixBeeps I'm running 2.8.0 too. I can't seem to find a packages tab, probably because I have to use Nix because my bot requires FFMPEG.

SixBeeps

@ASOwnerYT Ohhh right. I believe the binary that it's looking for only exists on Node Repls, but since you're running Nix, try adding the pkgs.libuuid derivation.

ASOwnerYT

@SixBeeps Didn't work, it had the same error :(