hubotio / generator-hubot

Hubot generator for Yeoman
MIT License
155 stars 91 forks source link

"Property name is not a function" when trying to run yo hubot:script #50

Closed drewkhoury closed 8 years ago

drewkhoury commented 9 years ago

I get the following when trying to run yo hubot:script

$ yo hubot:script

/usr/local/lib/node_modules/generator-hubot/generators/script/index.js:64
      var userName = this.user.git.name();
                                   ^
TypeError: Property 'name' of object #<Object> is not a function
    at Base.yeoman.generators.Base.extend.prompting.askFor (/usr/local/lib/node_modules/generator-hubot/generators/script/index.js:64:36)
    at /usr/local/lib/node_modules/generator-hubot/node_modules/yeoman-generator/lib/base.js:381:14
    at processImmediate [as _immediateCallback] (timers.js:345:15)

I'm not aware of any extra config I may need to do, but git is configured with a name:

$ git config --list
user.name=Andrew Khoury

I installed the generator via npm install -g yo generator-hubot on OSX.

drewkhoury commented 9 years ago

It would appear that using yo hubot-script works, however it's not clear (to me) why the README.md suggests one over the other, or why two exist.

technicalpickles commented 9 years ago

What version of yo do you have installed, ie yo --version? I think I have seen this before, but can't be sure.

It would appear that using yo hubot-script works, however it's not clear (to me) why the README.md suggests one over the other, or why two exist.

They are different packages. yo hubot:script is the official one.

technicalpickles commented 8 years ago

I suspec this may be related to the version of yo installed. If anyone else sees this, can you report the output of yo --version, and try upgrading.