Closed derdaisuke closed 7 years ago
Basically the readdir didn't work for some reason and I didn't bother coding in error handling, so it crashed on files being undefined instead.
I've just committed a patch that means you'll get a more relevant error message, but you've probably got the folder name wrong.
Your issue looks to be that you're including "podcasts/" in your path. It only wants the name of the folder containing the files. So you should be running
node decodeOpus.js 269590094065827840-1492712698088/
Yeah, nice catch, I completely missed that...
Thanks, it works :3
Error Log: daisuke@daisuke-server:/home/discord/podbot$ node decodeOpus.js podcasts/269590094065827840-1492712698088/ /home/discord/podbot/decodeOpus.js:51 files.forEach((file) => { ^
TypeError: Cannot read property 'forEach' of undefined at fs.readdir (/home/discord/podbot/decodeOpus.js:51:8) at FSReqWrap.oncomplete (fs.js:114:15)