Jump to content

Discord Bot Failing to Start

Not a Bug 1.0.0

Papa
Papa

Posted

:/home/container$ node /home/container/index.js
node:internal/modules/cjs/loader:1460
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^
Error: /home/container/node_modules/canvas/build/Release/canvas.node: invalid ELF header
    at Module._extensions..node (node:internal/modules/cjs/loader:1460:18)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/home/container/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
    at Module._load (node:internal/modules/cjs/loader:1019:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Amino

Posted

Delete the node modules folder and restart the bot

  • Love 1
Papa

Posted

  On 7/17/2024 at 2:25 PM, Amino said:

Delete the node modules folder and restart the bot

Expand  

Took you a whole 5 minutes to reply with the correct solution! 😄 Worked like a charm, thanks Amino!

Amino

Posted

Haha, you're welcome

Amino

Posted

Changed Status from Pending to Not a Bug

Papa

Posted (edited)

Running fine now, but receiving errors when trying to use commands with the Discord bot:

image.png.2a244d2f2665fb64a59e999867ae8ce1.png

image.png.161423e79812313fe37dd4806649f2d8.png

TypeError: Cannot read properties of undefined (reading 'Id')
    at /home/container/src/commands/vendingSearch.js:41:110
    at Array.find (<anonymous>)
    at /home/container/src/commands/vendingSearch.js:41:72
    at Array.filter (<anonymous>)
    at Object.run (/home/container/src/commands/vendingSearch.js:41:43)
    at Client.<anonymous> (/home/container/src/backend/establishConnection.js:49:21)
    at Client.emit (node:events:517:28)
    at InteractionCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12)
    at module.exports [as INTERACTION_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:354:31)
 

Edited by Papa
Amino

Posted

Odd. Is src/backend/itemsList.json and vendingList populated with stuff?

Papa

Posted

  On 7/17/2024 at 2:51 PM, Amino said:

Odd. Is src/backend/itemsList.json and vendingList populated with stuff?

Expand  

Yes both of those files are populated

Amino

Posted (edited)

Hmm, looks like the command was getting an invalid item. Which shouldn’t cause this error but I forgot to put in a check if the item itself was valid 🤦‍♂️
I will take a look at getting an update ready for this by Friday

Edited by Amino
  • Love 1
Papa

Posted

  On 7/17/2024 at 5:42 PM, Amino said:

Hmm, looks like the command was getting an invalid item. Which shouldn’t cause this error but I forgot to put in a check if the item itself was valid 🤦‍♂️
I will take a look at getting an update ready for this by Friday

Expand  

Bump 🙂

1.7m

Downloads

Total number of downloads.

7.9k

Customers

Total customers served.

119.3k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.