How to fix error config bot.json i also have folder

Error: Cannot find module ‘…/config/bot.json’
Require stack:

  • /home/runner/UPlay-Music-Bot/events/guild/message.js
  • /home/runner/UPlay-Music-Bot/handler/event.js
  • /home/runner/UPlay-Music-Bot/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (/home/runner/UPlay-Music-Bot/events/guild/message.js:1:16)
    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) {
    code: ‘MODULE_NOT_FOUND’,
    requireStack: [
    ‘/home/runner/UPlay-Music-Bot/events/guild/message.js’,
    ‘/home/runner/UPlay-Music-Bot/handler/event.js’,
    ‘/home/runner/UPlay-Music-Bot/index.js’
    ]
    }
    exit status 1

Try this path ../../config/bot.json

Also you should probably reset your token as you just leaked it :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.