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

"yo hubot" fails on ubuntu 14.04. #1178

Closed
sylvesterjakubowski opened this issue May 2, 2016 · 6 comments
Closed

"yo hubot" fails on ubuntu 14.04. #1178

sylvesterjakubowski opened this issue May 2, 2016 · 6 comments

Comments

@sylvesterjakubowski
Copy link

/usr/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/untildify/index.js:2
const osHomedir = require('os-homedir');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:10:17)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)

History:

18 wget https://deb.nodesource.com/setup_dev
19 chmod +x setup_dev
21 sudo ./setup_dev
22 sudo apt-get install nodejs
25 sudo npm install -g yo generator-hubot
27 mkdir hubot
28 cd hubot/
29 yo hubot

sjakubowski@sjakubowski-u:/hubot$ uname -a
Linux sjakubowski-u 3.19.0-25-generic #26
14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Thanks.

@sylvesterjakubowski
Copy link
Author

sylvesterjakubowski commented May 2, 2016

I managed the above issue by using

https://deb.nodesource.com/setup_6.x

Instead, the documentation didn't seem to reference this.

@sylvesterjakubowski
Copy link
Author

After updating npm / node:

sjakubowski@sjakubowski-u:~/hubot$ sudo yo hubot
_____________________________
/ \
//\ | Extracting input for |
////\ _____ | self-replication process |
//////\ /\ \ /
======= |[^_/\_]| /----------------------------
| | |@@|
+===+/ /// \
| |
\ /// HUBOT/\
|
/// / \
\ / +---+
____/ | |
| //| +===+
// |xx|

? Owner Sylvester Jakubowski sjakubowski@someemail.com
? Bot name hubot
? Description A simple helpful robot for your Company
? Bot adapter (campfire)

/usr/lib/node_modules/yo/node_modules/rx/dist/rx.js:77
throw e;
^
true
sjakubowski@sjakubowski-u:/hubot$ npm -version
3.8.8
sjakubowski@sjakubowski-u:
/hubot$ nodejs -v
v6.0.0

@sylvesterjakubowski
Copy link
Author

sylvesterjakubowski commented May 2, 2016

I managed to fix this by running the

yo hubot --defaults

Command, which got further,

It complained of:

npm ERR! Refusing to install hubot as a dependency of itself

Which lead me to trying it from scratch in a new directory and it installed.

Hopefully this helps someone in the future.

@sylvesterjakubowski
Copy link
Author

sylvesterjakubowski commented May 2, 2016

Another undocumented step/issue from

https://hubot.github.com/docs/

When starting hubot got:

sjakubowski@sjakubowski-u:~/hubot2/bin$ ./hubot ./hubot: 8: exec: node_modules/.bin/hubot: not found

Resolved with:

sudo npm install -g coffee-script

@anoff
Copy link

anoff commented May 3, 2016

same on ubuntu 15.10, node 5.10.0, npm 3.8.3
However coffeescript didn't fix it for me :( also get the dependency of itselferror and exec: node_modules/.bin/hubot: not found

edit:
running things on node v4.4.3 and npm v2.15.1 works (even without global coffeescript)
however yo generator complains about outdated npm versions

@stale
Copy link

stale bot commented Aug 23, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants