ZerioDev / Music-bot

A complete code to download for a cool Discord music bot !
https://discord.gg/5cGSYV8ZZj
GNU General Public License v3.0
892 stars 1.09k forks source link

Error emitted from the Bot Cannot convert "undefined" to int #299

Closed danielcamargo closed 8 months ago

danielcamargo commented 8 months ago
Error emitted from the Bot Cannot convert "undefined" to int
node:events:496
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot convert "undefined" to int
    at Object.toWireType (/Users/daniel/Projects/Personal/Music-bot/node_modules/opusscript/build/opusscript_native_wasm.js:54:55)
    at OpusScriptHandler.OpusScriptHandler$_encode [as _encode] (eval at Db (/Users/daniel/Projects/Personal/Music-bot/node_modules/opusscript/build/opusscript_native_wasm.js:36:242), <anonymous>:11:26)
    at OpusScript.encode (/Users/daniel/Projects/Personal/Music-bot/node_modules/opusscript/index.js:69:28)
    at OpusEncoder._transform (/Users/daniel/Projects/Personal/Music-bot/node_modules/@discord-player/opus/dist/index.js:197:29)
    at Transform._write (node:internal/streams/transform:171:8)
    at writeOrBuffer (node:internal/streams/writable:564:12)
    at _write (node:internal/streams/writable:493:10)
    at Writable.write (node:internal/streams/writable:502:10)
    at _VolumeTransformer.ondata (node:internal/streams/readable:1007:22)
    at _VolumeTransformer.emit (node:events:518:28)
Emitted 'error' event on VolumeTransformer instance at:
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
danielcamargo commented 8 months ago

It runs fine in Node.js 18.19.1 Added a .nvmrc and fixed the issue

18.19.1