user5506968
user5506968

Reputation:

Discord Server Bot (js) Heroku Error

I tried running my Discord bot off Heroku and I keep getting an error that I don't get when simply running the script from command prompt.

2018-04-30T10:06:12.826804+00:00 app[worker.1]: at Object. (/app/app.js:1:79)

2018-04-30T10:06:12.826801+00:00 app[worker.1]: at Module.require (module.js:596:17)

2018-04-30T10:06:12.826805+00:00 app[worker.1]: at Module._compile (module.js:652:30)

2018-04-30T10:06:12.826806+00:00 app[worker.1]: at Object.Module._extensions..js (module.js:663:10)

2018-04-30T10:06:12.826808+00:00 app[worker.1]: at Module.load (module.js:565:32)

2018-04-30T10:06:12.826809+00:00 app[worker.1]: at tryModuleLoad (module.js:505:12)

2018-04-30T10:06:12.826811+00:00 app[worker.1]: at Function.Module._load (module.js:497:3)

2018-04-30T10:06:12.900030+00:00 heroku[worker.1]: State changed from up to crashed

2018-04-30T10:06:28.454851+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=vertigo-bot.herokuapp.com request_id=aaa10458-2921-457a-b3c2-57371244cbc8 fwd="HIDDEN" dyno= connect= service= status=503 bytes= protocol=https

2018-04-30T10:06:29.034606+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=vertigo-bot.herokuapp.com request_id=b881c0bc-8011-4487-9aaa-3c6865652044 fwd="HIDDEN dyno= connect= service= status=503 bytes= protocol=https

Here is also my Github directory

Upvotes: 0

Views: 1289

Answers (2)

Pruina Tempestatis
Pruina Tempestatis

Reputation: 394

In your package.json, you haven't installed discord.js. Just simply go to your code editor and install discord.js as a saved dependency. Then copy everything inside your package.json to your GitHub.

Hope this helped!

Upvotes: 0

Yoni Rabinovitch
Yoni Rabinovitch

Reputation: 5261

You don't seem to have any "dependencies" in your package.json. Hence, Heroku can't find discord.js that your app depends upon.

To fix that, run:

npm install discord.js --save

Then commit your package.json, and push to heroku.

Upvotes: 1

Related Questions