These questions are some of the most frequently asked.
No matter what, I get SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
‽
Update to Node.js 10.0.0 or newer.
- Install FFMPEG.
- Install either the
node-opus
package or theopusscript
package. node-opus is greatly preferred, due to it having significantly better performance.
- npm:
npm install ffmpeg-binaries
- Ubuntu 16.04:
sudo apt install ffmpeg
- Ubuntu 14.04:
sudo apt-get install libav-tools
- Windows:
npm install ffmpeg-binaries
or see the FFMPEG section of AoDude's guide.
- Ubuntu: Simply run
npm install node-opus
, and it's done. Congrats! - Windows: Run
npm install --global --production windows-build-tools
in an admin command prompt or PowerShell. Then, runningnpm install node-opus
in your bot's directory should successfully build it. Woo!
Other questions can be found at the official Discord.js guide If you have issues not listed here or on the guide, feel free to ask in the official Discord.js server. Always make sure to read the documentation.