Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On heroku cedar stack -> bin/hubot: 3: npm: not found #155

Closed
vlpeng opened this issue Nov 7, 2011 · 15 comments
Closed

On heroku cedar stack -> bin/hubot: 3: npm: not found #155

vlpeng opened this issue Nov 7, 2011 · 15 comments

Comments

@vlpeng
Copy link

vlpeng commented Nov 7, 2011

I followed up https://github.com/github/hubot/wiki/Hubot-on-Heroku and deploy hubot-1.1.9.tar.gz to heroku. However I always encountered this issue:

  • 2011-11-07T18:20:14+00:00 heroku[app.1]: Starting process with command bin/hubot -a campfire -n Hubot
  • 2011-11-07T18:20:14+00:00 app[app.1]: bin/hubot: 3: npm: not found

gist

Here the details of heroku logs, https://gist.github.com/1345730

help me...

I am wondering I miss something in heroku deployment of procedure, since I check this http://devcenter.heroku.com/articles/node-js for many times.

hubot image me @ local is working

Please refer https://gist.github.com/1345763

@atmos
Copy link
Contributor

atmos commented Nov 7, 2011

It turns out that error is harmless on heroku, the npm packaging is done at slug compilation time so you can safely ignore it.

If you want to silence the error remove the npm install from bin/hubot

@atmos atmos closed this as completed Nov 7, 2011
@stealth35
Copy link

@atmos, I've the same issue (https://gist.github.com/1345763), just three dot, and nothing in campfire

2011-11-29T00:47:01+00:00 heroku[app.1]: State changed from up to bouncing
2011-11-29T00:47:02+00:00 heroku[app.1]: State changed from bouncing to down
2011-11-29T00:47:02+00:00 heroku[app.1]: State changed from down to created
2011-11-29T00:47:02+00:00 heroku[app.1]: State changed from created to starting
2011-11-29T00:47:04+00:00 heroku[app.1]: Stopping process with SIGTERM
2011-11-29T00:47:04+00:00 heroku[app.1]: Starting process with command `bin/hubot -a campfire -n Hubot`
2011-11-29T00:47:05+00:00 app[app.1]: bin/hubot: 3: npm: not found
2011-11-29T00:47:05+00:00 app[app.1]: [Tue, 29 Nov 2011 00:47:05 GMT] INFO Loading adapter campfire
2011-11-29T00:47:05+00:00 app[app.1]: [Tue, 29 Nov 2011 00:47:05 GMT] INFO Loading scripts from /app/src/scripts
2011-11-29T00:47:05+00:00 app[app.1]: [Tue, 29 Nov 2011 00:47:05 GMT] INFO Loading scripts from /app/scripts
2011-11-29T00:47:05+00:00 app[app.1]: [Tue, 29 Nov 2011 00:47:05 GMT] INFO Loading hubot-scripts from /app/node_modules/hubot-scripts/src/scripts
2011-11-29T00:47:05+00:00 heroku[app.1]: State changed from starting to up
Process       State               Command
------------  ------------------  ------------------------------
app.1         up for 1m           bin/hubot -a campfire -n Hubot

Hubot v2.0.4, and follow the campfire wiki

@atmos
Copy link
Contributor

atmos commented Nov 29, 2011

Do you have all of the proper environmental variables set on heroku? The heroku config:add portion of the README.

@stealth35
Copy link

@atmos yep

@tombell
Copy link
Contributor

tombell commented Nov 29, 2011

Your bot has it's own Campfire account right? It won't work if it's using your own Campfire account. Just checking because I've spoken with a few people who've gone this route. :)

@stealth35
Copy link

@tombell I'm of this people, thanks

@joeyAghion
Copy link

I'm using the IRC adapter and have a similar issue. The bot (irtsybot) enters the chat room and receives my messages (as indicated in the logs), but doesn't respond. My config and logs look like the following. Any tips?

$ heroku config
HUBOT_IRC_DEBUG  => true
HUBOT_IRC_ROOMS  => #irtsy
HUBOT_IRC_SERVER => irc.freenode.net
PATH             => bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin
REDISTOGO_URL    => redis://...:9069/

$ heroku logs
...
2011-12-12T01:12:21+00:00 app[app.1]: From halfamind to #irtsy: irtsybot help
2011-12-12T01:12:21+00:00 app[app.1]: #irtsy <halfamind> irtsybot help

@tombell
Copy link
Contributor

tombell commented Dec 12, 2011

What is in your Procfile?

@joeyAghion
Copy link

$ cat Procfile
app: bin/hubot -a irc -n irtsybot
$ heroku ps
Process  State      Command
-------  ---------  ----------------------------
app.1    up for 4h  bin/hubot -a irc -n irtsybot

Thanks again

@tombell
Copy link
Contributor

tombell commented Dec 12, 2011

You might need to update the hubot-irc package.

@joeyAghion
Copy link

I updated my package.json as you recommended:

"dependencies": {
  "hubot": ">= 2.0.7",
  "hubot-irc": ">= 0.0.3",
  "hubot-scripts": ">= 2.0.2",
  "optparse": "1.0.3"
}

...and redeployed, but didn't see any improvement. However, I was able to launch the bot with the same configuration locally (on OSX), and it worked great. On a hunch, I destroyed the heroku app and recreated it, and that did the trick. I guess the heroku env's versions still satisfied the package.json spec? Either way, working great now. Thanks.

@dustineichler
Copy link

I'm getting the same npm error, but this "Invalid access token provided, campfire refused..." might be a related false positive since I'm using my personal account and one additional account for my Hubbot. I also tried installing v2.0.4, but didn't take. Suggestions?

2011-12-19T04:57:35+00:00 heroku[app.1]: Starting process with command bin/hubot -a campfire -n Hubot
2011-12-19T04:57:35+00:00 app[app.1]: bin/hubot: 3: npm: not found
2011-12-19T04:57:35+00:00 app[app.1]: [Mon, 19 Dec 2011 04:57:35 GMT] INFO Loading adapter campfire
2011-12-19T04:57:35+00:00 app[app.1]: [Mon, 19 Dec 2011 04:57:35 GMT] INFO Loading scripts from /app/scripts
2011-12-19T04:57:35+00:00 app[app.1]: [Mon, 19 Dec 2011 04:57:35 GMT] INFO Loading scripts from /app/src/scripts
2011-12-19T04:57:35+00:00 app[app.1]: [Mon, 19 Dec 2011 04:57:35 GMT] INFO Loading hubot-scripts from /app/node_modules/hubot-scripts/src/scripts
2011-12-19T04:57:36+00:00 app[app.1]: Successfully connected to Redis
2011-12-19T04:57:36+00:00 app[app.1]:
2011-12-19T04:57:36+00:00 app[app.1]: /app/node_modules/hubot/src/adapters/campfire.coffee:278
2011-12-19T04:57:36+00:00 app[app.1]: throw new Error("Invalid access token provided, campfire refus
2011-12-19T04:57:36+00:00 app[app.1]: ^
2011-12-19T04:57:36+00:00 app[app.1]: Error: Invalid access token provided, campfire refused the authentication
2011-12-19T04:57:36+00:00 app[app.1]: at IncomingMessage. (/app/node_modules/hubot/src/adapters/campfire.coffee:278:23)
2011-12-19T04:57:36+00:00 app[app.1]: at IncomingMessage.emit (events.js:81:20)
2011-12-19T04:57:36+00:00 app[app.1]: at HTTPParser.onMessageComplete (http.js:133:23)
2011-12-19T04:57:36+00:00 app[app.1]: at CleartextStream.ondata (http.js:1213:22)
2011-12-19T04:57:36+00:00 app[app.1]: at CleartextStream._push (tls.js:291:27)
2011-12-19T04:57:36+00:00 app[app.1]: at EncryptedStream.write (tls.js:97:13)
2011-12-19T04:57:36+00:00 app[app.1]: at SecurePair._cycle (tls.js:565:20)
2011-12-19T04:57:36+00:00 app[app.1]: at Socket.ondata (stream.js:40:26)
2011-12-19T04:57:36+00:00 app[app.1]: at Socket.emit (events.js:64:17)
2011-12-19T04:57:36+00:00 app[app.1]: at Socket._onReadable (net.js:676:14)
2011-12-19T04:57:36+00:00 heroku[app.1]: State changed from starting to up
2011-12-19T04:57:38+00:00 heroku[app.1]: Process exited
2011-12-19T04:57:37+00:00 heroku[app.1]: State changed from up to crashed
2011-12-19T04:57:49+00:00 heroku[app.1]: State changed from crashed to created
2011-12-19T04:57:49+00:00 heroku[app.1]: State changed from created to starting
2011-12-19T04:57:53+00:00 heroku[app.1]: State changed from starting to up
2011-12-19T04:57:54+00:00 heroku[app.1]: State changed from up to crashed

@tombell
Copy link
Contributor

tombell commented Dec 19, 2011

That means you provided the incorrect API token for Campfire. You should also update to the latest hubot by updating the version in package.json.

@alx
Copy link

alx commented Dec 30, 2011

First install of new version of hubot on heroku, I had the same problem, variables were not set for campfire adapter set by default in Procfile.

If you have this problem, verify:

  • that your Procfile contains only the adapters you need
  • that you've defined all the variable on heroku for these adapters

and it should work fine.

@joanrodriguez
Copy link

I had the same problem which I solved by erasing the node_modules folder and then reinstalling every module with npm install --save
Yo had installed every modules but nothing in package.json, and the gitignore was ignoring node_modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants