shitcorp / discord-bot-dashboard

The npm package for using the Discord Bot Dashboard inside your own source code
312 stars 124 forks source link

Cannot access app before initialization #131

Closed Considerated closed 2 years ago

Considerated commented 3 years ago
2021-03-25 21:19:15 - error [app.js]: Cannot access 'app' before initialization
{
  "stack": "ReferenceError: Cannot access 'app' before initialization
    at Object.<anonymous> (/home/runner/nodebot-v4-3/node_modules/discord-bot-dashboard/modules/app.js:9:45)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at /home/runner/nodebot-v4-3/node_modules/discord-bot-dashboard/index.js:31:17
    at new Promise (<anonymous>)
    at Dashboard.run (/home/runner/nodebot-v4-3/node_modules/discord-bot-dashboard/index.js:29:16)
    at Client.<anonymous> (/home/runner/nodebot-v4-3/app.js:42:13)
    at Client.emit (events.js:326:22)
    at WebSocketManager.triggerClientReady (/home/runner/nodebot-v4-3/node_modules/discord.js/src/client/websocket/WebSocketManager.js:431:17)
    at WebSocketManager.checkShardsReady (/home/runner/nodebot-v4-3/node_modules/discord.js/src/client/websocket/WebSocketManager.js:415:10)
    at WebSocketShard.<anonymous> (/home/runner/nodebot-v4-3/node_modules/discord.js/src/client/websocket/WebSocketManager.js:197:14)
    at WebSocketShard.emit (events.js:314:20)
    at WebSocketShard.checkReady (/home/runner/nodebot-v4-3/node_modules/discord.js/src/client/websocket/WebSocketShard.js:475:12)
    at WebSocketShard.onPacket (/home/runner/nodebot-v4-3/node_modules/discord.js/src/client/websocket/WebSocketShard.js:447:16)
    at WebSocketShard.onMessage (/home/runner/nodebot-v4-3/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/runner/nodebot-v4-3/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
    at Receiver.receiverOnMessage (/home/runner/nodebot-v4-3/node_modules/ws/lib/websocket.js:825:20)"
}

I keep getting this error while trying to run my bot, I use a custom client for that. Someone please help me through this?

AgentHackerYT commented 3 years ago

Same Problem

Huskydog9988 commented 2 years ago

The project has comepletly changed its codease and this is no longer valid.