yeoman / generator-polymer

Scaffold out a Polymer project
http://polymer-project.org
926 stars 149 forks source link

Error when generating the github page #227

Closed markhuang1212 closed 8 years ago

markhuang1212 commented 8 years ago
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn bash ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
    at child_process.js:1144:20
    at process._tickCallback (node.js:355:11)

by the way, my element's sourse code is here

samccone commented 8 years ago

@markhuang1212 can you list the steps to reproduce, and node version and OS please?

markhuang1212 commented 8 years ago

I use windows 10, and my node version is 0.12.7. This happens after it asked me the name of my element. I have tried it again by creating a new element by yo polymer:seed my-element, but I got the same thing. However, a folder like "tmp-1443836520668" with a gp.sh inside was create every time i tried generating a github page.

I've already SSH keys setup on Github.

arthurvr commented 8 years ago

Can you give us the generator-polymer version you're on?

ragingwind commented 8 years ago

I would recommend that you try to re-install npm and pacakges. Error: spawn bash ENOENT error was related to npm that I saw.

markhuang1212 commented 8 years ago

I'm using the newest version of generator-polymer. re-install npm, yeoman and polymer-generator doesn't solve the problem.

robdodson commented 8 years ago

Possibly dumb question as I'm not a Windows user. The line in question is trying to spawn bash. Will that work on Windows? Are you running any kind of bash emulation?

markhuang1212 commented 8 years ago

@robdodson I'm not really understand the meaning of "spawn bash" and "bash emulation". I use Git Bash sometimes, is it a kind of "bash emulation"?

robdodson commented 8 years ago

bash is the command line used on most Mac/Unix/Linux machines. This command assumes that the Node process is able to run bash and if it can't find it then it won't work. @addyosmani knows more about running node on Windows than I do so he might know some steps to debug. My hunch is that the node process can't find the bash command but I may be totally wrong, that's just a guess :)

silentHoo commented 8 years ago

Yep that's the problem here. The script won't run under Windows. With some pain and cygwin installed it would work, but without you must do the steps in the gp.sh by hand.

robdodson commented 8 years ago

@silentHoo hmmmmm any suggestions how we could make it work in both places?

MeTaNoV commented 8 years ago

By using 'Git Bash' it should be working, at least, it worked out for me!

robdodson commented 8 years ago

OK so maybe we can update the README to recommend users have Git Bash installed. That's a start at least :)

robdodson commented 8 years ago

Added at 3fc34f3452b62761318861fc5df0c593d989e0ed

Going to close the issue but happy to modify the underlying script if someone has a better solution

MeTaNoV commented 8 years ago

:+1:

markhuang1212 commented 8 years ago

@robdodson It works when i use git bash. Thanks a lot.