Master-Bot: The bot doesn't start
When i try to run the command node index.js i get this error:
C:\Users\Utente\Documents\Master-Bot-main>node index.js
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module 'timers/promises'
Require stack:
- C:\Users\Utente\Documents\Master-Bot-main\node_modules\@discordjs\rest\dist\lib\handlers\SequentialHandler.js
- C:\Users\Utente\Documents\Master-Bot-main\node_modules\@discordjs\rest\dist\lib\RequestManager.js
- C:\Users\Utente\Documents\Master-Bot-main\node_modules\@discordjs\rest\dist\index.js
- C:\Users\Utente\Documents\Master-Bot-main\index.js
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:745:27)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:961:19)←[39m
←[90m at require (internal/modules/cjs/helpers.js:92:18)←[39m
at Object.<anonymous> (C:\Users\Utente\Documents\Master-Bot-main\node_modules\←[4m@discordjs←[24m\rest\dist\lib\handlers\SequentialHandler.js:6:20)
←[90m at Module._compile (internal/modules/cjs/loader.js:1072:14)←[39m
←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:937:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:778:12)←[39m
←[90m at Module.require (internal/modules/cjs/loader.js:961:19)←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: [
←[32m'C:\\Users\\Utente\\Documents\\Master-Bot-main\\node_modules\\@discordjs\\rest\\dist\\lib\\handlers\\SequentialHandler.js'←[39m,
←[32m'C:\\Users\\Utente\\Documents\\Master-Bot-main\\node_modules\\@discordjs\\rest\\dist\\lib\\RequestManager.js'←[39m,
←[32m'C:\\Users\\Utente\\Documents\\Master-Bot-main\\node_modules\\@discordjs\\rest\\dist\\index.js'←[39m,
←[32m'C:\\Users\\Utente\\Documents\\Master-Bot-main\\index.js'←[39m
]
}
- OS: Windows
- Node Version(Should be v14 atleast): 14.17.6
- Is python 2.7 installed?: yes
- How are you hosting the bot(Locally, on a vps, heroku, glitch…): locally
I hope you can help me, Francesco.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (5 by maintainers)
I’m stupid, i didn’t add config.json to the fork on github… Sorry guys for bothering you and thanks for the help! Now it works and that’s the worth part!
The “package.json” will like this:
And I set config the “buildpacks” like this: (Cmd: “heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#latest -a your-app” | Change “your-app” to your app name like “mastet-bot”)
And it works smoothly :33 #KiyoshiKunCool
Just add:
“engines”: { “node”: “16.9.0” }
it works on my Heroku 😄