Open piercelamb opened 8 years ago
Did the same here and it fails. You need to use the other fork:
Perfect, worked. Thank you.
Turns out that doesn't work. The other fork has the following issue:
7T22:13:45.431322+00:00 app[web.1]: Wed Aug 17 2016 22:13:45 GMT+0000 (UTC) – fetching
2016-08-17T22:13:45.473226+00:00 app[web.1]: Wed Aug 17 2016 22:13:45 GMT+0000 (UTC) – Error: Invalid Slack response: 429
2016-08-17T22:13:45.473229+00:00 app[web.1]: at SlackData.onres (/app/lib/slack.js:56:17)
2016-08-17T22:13:45.473230+00:00 app[web.1]: at /app/lib/slack.js:23:12
2016-08-17T22:13:45.473231+00:00 app[web.1]: at Request.callback (/app/node_modules/superagent/lib/node/index.js:746:30)
2016-08-17T22:13:45.473231+00:00 app[web.1]: at Request.
BUT this version is working:
https://heroku.com/deploy?template=https://github.com/niftylettuce/slackin/tree/master
@gtyler Also broken.
2016-08-20T02:29:02.801959+00:00 heroku[web.1]: Starting process with command `bin/slackin --coc "$SLACK_COC" --channels "$SLACK_CHANNELS" --port 3475 my-slack.slack.com slack-key`
2016-08-20T02:29:05.730489+00:00 heroku[web.1]: Process exited with status 1
2016-08-20T02:29:05.497794+00:00 app[web.1]: Sat Aug 20 2016 02:29:05 GMT+0000 (UTC) – fetching
2016-08-20T02:29:05.567878+00:00 app[web.1]: Sat Aug 20 2016 02:29:05 GMT+0000 (UTC) – listening on 0.0.0.0:3475
2016-08-20T02:29:05.625911+00:00 app[web.1]: /app/dist/slack.js:53
2016-08-20T02:29:05.625913+00:00 app[web.1]: (res.body.channels || []).forEach(function (channel) {
2016-08-20T02:29:05.625931+00:00 app[web.1]: ^
2016-08-20T02:29:05.625932+00:00 app[web.1]:
2016-08-20T02:29:05.625932+00:00 app[web.1]: TypeError: Cannot read property 'body' of undefined
2016-08-20T02:29:05.625933+00:00 app[web.1]: at /app/dist/slack.js:53:13
2016-08-20T02:29:05.625933+00:00 app[web.1]: at Request.callback (/app/node_modules/superagent/lib/node/index.js:746:30)
2016-08-20T02:29:05.625941+00:00 app[web.1]: at ClientRequest.<anonymous> (/app/node_modules/superagent/lib/node/index.js:711:10)
2016-08-20T02:29:05.625951+00:00 app[web.1]: at ClientRequest.emit (events.js:182:7)
2016-08-20T02:29:05.625950+00:00 app[web.1]: at emitOne (events.js:90:13)
2016-08-20T02:29:05.625951+00:00 app[web.1]: at TLSSocket.socketErrorListener (_http_client.js:306:9)
2016-08-20T02:29:05.625952+00:00 app[web.1]: at emitOne (events.js:90:13)
2016-08-20T02:29:05.625953+00:00 app[web.1]: at TLSSocket.emit (events.js:182:7)
2016-08-20T02:29:05.625953+00:00 app[web.1]: at emitErrorNT (net.js:1265:8)
2016-08-20T02:29:05.625958+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:74:11)
2016-08-20T02:29:05.743427+00:00 heroku[web.1]: State changed from starting to crashed
2016-08-20T02:29:05.744399+00:00 heroku[web.1]: State changed from crashed to starting
2016-08-20T02:29:07.043719+00:00 heroku[web.1]: Starting process with command `bin/slackin --coc "$SLACK_COC" --channels "$SLACK_CHANNELS" --port 56933 my-slack.slack.com slack-key`
2016-08-20T02:29:09.374471+00:00 heroku[web.1]: Process exited with status 1
2016-08-20T02:29:09.239040+00:00 app[web.1]: Sat Aug 20 2016 02:29:09 GMT+0000 (UTC) – fetching
2016-08-20T02:29:09.261001+00:00 app[web.1]: Sat Aug 20 2016 02:29:09 GMT+0000 (UTC) – listening on 0.0.0.0:56933
2016-08-20T02:29:09.291589+00:00 app[web.1]: /app/dist/slack.js:59
2016-08-20T02:29:09.291592+00:00 app[web.1]: ^
2016-08-20T02:29:09.291591+00:00 app[web.1]: var team = res.body.team;
2016-08-20T02:29:09.291596+00:00 app[web.1]: TypeError: Cannot read property 'body' of undefined
2016-08-20T02:29:09.291592+00:00 app[web.1]:
2016-08-20T02:29:09.291596+00:00 app[web.1]: at /app/dist/slack.js:59:23
2016-08-20T02:29:09.291597+00:00 app[web.1]: at Request.callback (/app/node_modules/superagent/lib/node/index.js:746:30)
2016-08-20T02:29:09.291598+00:00 app[web.1]: at emitOne (events.js:90:13)
2016-08-20T02:29:09.291598+00:00 app[web.1]: at ClientRequest.<anonymous> (/app/node_modules/superagent/lib/node/index.js:711:10)
2016-08-20T02:29:09.291598+00:00 app[web.1]: at ClientRequest.emit (events.js:182:7)
2016-08-20T02:29:09.291599+00:00 app[web.1]: at TLSSocket.socketErrorListener (_http_client.js:306:9)
2016-08-20T02:29:09.291599+00:00 app[web.1]: at emitOne (events.js:90:13)
2016-08-20T02:29:09.291600+00:00 app[web.1]: at TLSSocket.emit (events.js:182:7)
2016-08-20T02:29:09.291600+00:00 app[web.1]: at emitErrorNT (net.js:1265:8)
2016-08-20T02:29:09.291600+00:00 app[web.1]: at _combinedTickCallback (internal/process/next_tick.js:74:11)
2016-08-20T02:29:09.369079+00:00 heroku[web.1]: State changed from starting to crashed
It seems that the issue is resolved by pushing the dist folder generated by the build (gulp in this case). I used heroku-cli to clone the app, then I just ran npm install, which in turn generated the dist folder. I pushed it to master afterwards and it worked.
Also, take a look at https://github.com/rauchg/slackin/issues/221
Any better solution then @itechdom offers? It shouldn't be like this.
I clicked the "deploy to heroku" button and went through the required steps on the linked page to deploy. In the heroku logs after trying to load the site, i get: