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 yo inception issue #51

Closed
pzi opened this issue Jul 5, 2013 · 12 comments
Closed

yo yo inception issue #51

pzi opened this issue Jul 5, 2013 · 12 comments

Comments

@pzi
Copy link

pzi commented Jul 5, 2013

Today, I updated yo to 1.0.0-rc.1.1 and I really like yo yo.
Great stuff @stephenplusplus.
Unfortunately, I now have the one issue that everything that I type during the prompts is output twice.

Example:

mkdir stuff && cd $_
yo

Everything is fine until I select a generator and the prompts start:

[?] Would you mind telling me your username on Github?: (someuser) ssoommeeuusseerr

In some cases it also happened that the "exit message" (Bye from us etc...) appeared twice, too.

I briefly spoke with @SBoudrias about it, he was able to reproduce it.

Currently I am running:

  • node@0.10.12
  • npm@1.2.32
  • osx@10.7.5
  • yo@1.0.0-rc.1.1
  • Generators:
    • generator-blog@0.0.0
    • generator-generator@0.2.2
    • generator-mocha@0.1.1
    • generator-roots@0.3.0
    • generator-webapp@0.2.6
    • generator-wordpress@1.0.3
    • generator-yo-wordpress@1.2.1

Hope the above helps, otherwise please let me know. I am also on IRC for another while (although it's 2am here in OZ).

Cheers & thanks

@SBoudrias
Copy link
Member

I think it's related to Inquirer and the Readline Stream not being cleared. I tough this was resolved a while back, but I haven't test it for a case like this one where another generator is called by another one (inception!)

Although, the part about the exit message feels odd.

@pzi
Copy link
Author

pzi commented Jul 5, 2013

I got the double exit messages a couple of times. But when just running yo, choosing a generator and follow the prompts it doesn't happen.

But, just now I was able to reproduce it and it is exactly the inception thing.

Steps:

  1. yo
  2. install generator
  3. search angular
  4. choose first angular
  5. proceed with install
  6. automatically starts using angular
  7. scaffolds angular project

and at the end it exits the angular generator, exit message (1), and then yo, exit message (2).

@stephenplusplus
Copy link

Yikes. Thanks for reporting.

If every installed generator shares an npm linked node_modules/yeoman-generator, the double stuff goes away. I'm still playing around and will share any progress!

@stephenplusplus
Copy link

I went a little further and let each generator have their own unique copy of yeoman-generator as usual, but npm linked inquirer, and everything worked well.

@SBoudrias
Copy link
Member

@stephenplusplus Yeah, I had this kind of issue when using most command line stream project (mute stream, charm, etc).

@stephenplusplus
Copy link

This stuff is a little above my head:

this stuff
👨

So hopefully someone smarter than me can help out with this!

@SBoudrias
Copy link
Member

Hi there, I've reproduced the bug and implemented a fix in Inquirer 0.2.1 (published to NPM) that fixed it on my machine.

Although, Yeoman implemented the 0.2 of Inquirer only in 1.0.0-rc. I wonder what the time frame is for the complete release?

@SBoudrias
Copy link
Member

Hey, soooo as I want to make sure this is fixed for everybody, I also pushed the fix on the 0.1.x series.

Let me know how it goes for you!

@pzi
Copy link
Author

pzi commented Jul 6, 2013

It seems to be working now @SBoudrias. The two messages at the end remain, but it makes kinda sense since we are exiting 2 yo's.

@passy
Copy link
Member

passy commented Jul 6, 2013

Thanks, @SBoudrias! Fixes it for me! 🤘

I'll add something for the double message thingy.

@stephenplusplus
Copy link

This was an awesome series of events. First, thanks to @pzi for being patient and reporting the bug, instead of just saying "bah, someone else'll catch it." And of course, thanks to @SBoudrias for chillin' in #yeoman, making yourself available to help, then releasing fixes for all Yo users. It is very appreciated, everyone :)

@pzi
Copy link
Author

pzi commented Jul 6, 2013

No worries @stephenplusplus, my pleasure. Follow & like the work you guys are doing a lot. Also thanks to @SBoudrias for helping me out with other issues.

Cheers

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

4 participants