I have been working on a discord bot that is working fine when run locally, but it is crashing when hosted on heroku.
worker : node bot.jsThis is the package.json:
{
"name": "randomizerbot",
"version": "1.0.0",
"description": "",
"main": "bot.js",
"scripts": {
"start": "node bot.js"
},
"engines": {
"node": ">=16.6.0"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"discord.js": "^13.6.0",
"dotenv": "^16.0.0",
"nodemon": "^2.0.15"
}
}
This is my file structure:
This is the error log:
2022-07-11T14:48:48.995714+00:00 heroku[worker.1]: State changed from crashed to starting
2022-07-11T14:48:51.478349+00:00 heroku[worker.1]: Starting process with command `: node bot.js`
2022-07-11T14:48:52.092041+00:00 heroku[worker.1]: State changed from starting to up
2022-07-11T14:48:52.341005+00:00 heroku[worker.1]: Process exited with status 0
2022-07-11T14:48:52.809725+00:00 heroku[worker.1]: State changed from up to crashed
Is there something that I am missing? Thanks in advance.