jonathonor / syncBot

A bot that syncs roles between multiple discord servers.
https://www.jonsbots.com/syncBot
30 stars 16 forks source link

Errors when trying to use any command #17

Closed xhatz closed 1 year ago

xhatz commented 2 years ago

Hello! First of all thank you for your work, it's exactly what I've been looking for for a while! I have an error, however, when I run the command "node register.js" on my shared hosting (which supports nodejs apps). Here is the output of that command:

[bots/syncbot (16)] [####@delaware syncbot]$ node register.js
Started refreshing application (/) commands.
TypeError: Cannot destructure property 'exports' of 'undefined' as it is undefined.
    at new Parser (/home/####/bots/syncbot/node_modules/undici/lib/client.js:405:34)
    at connect (/home/####/bots/syncbot/node_modules/undici/lib/client.js:1062:23)
/home/####/bots/syncbot/node_modules/undici/lib/client.js:1167
        if (socket[kParser].timeoutType !== TIMEOUT_IDLE) {
                            ^

TypeError: Cannot read properties of undefined (reading 'timeoutType')
    at _resume (/home/####/bots/syncbot/node_modules/undici/lib/client.js:1167:29)
    at resume (/home/####/bots/syncbot/node_modules/undici/lib/client.js:1131:3)
    at connect (/home/####/bots/syncbot/node_modules/undici/lib/client.js:1116:3)

I'm very newbie to nodejs, I have no idea what any of this means haha. I really hope you can help me. Thank you again!

jonathonor commented 1 year ago

Have you made sure that you ran npm install

Specifically

npm install discord.js @discordjs/rest discord-api-types axios

jonathonor commented 1 year ago

Closing the issue, this ended up being a permissions issue for @xhatz because they were trying to run the commands through cpanel terminal instead of the VM terminal.