Hey, I have a bot written in JavaScript with the help the discord.js module. I’m trying to get Canvas to work. I constantly get this error:
(node:17050) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): Error: error while reading from input stream
I uploaded my file in assets, and I tried to call it by ./assets/SX - Welcome Image.png
, but that didn’t work either. I also tried to call the file by the Glitch CDN link, along with a Imgur link… Anyone know how to make it work?
The assets folder in Glitch is a virtual folder, which doesn’t exist on your local filesystem so isn’t accessible by canvas. You’ll need to upload the files from the assets folder locally to your project. To do so, follow the steps here: Assets folder path