Skip to content
This repository

Windows Support #216

Closed
JamesMGreene opened this Issue August 17, 2012 · 135 comments
James M. Greene

Is anyone working on a install script (variant of "/setup.install.sh") for Windows?

Addy Osmani
Owner

At present there's no one championing Windows support, but this is something we're going to look at in the next version. @reybango had some interest in looking at this recently though. Perhaps he'd like to try seeing if it's possible?

James M. Greene

@reybango: Is it fair to assume that you were hoping to hook this up with a PowerShell script (vs. suffering through Windows Batch land)?

Rey Bango

@JamesMGreene I really don't have any specific ideas on how to make this work yet. I've only recently been given access. If you have some ideas, please let me know and maybe we can work together on it. Hit me up reybango at gmail.

Ethan J. Brown

This is something I could take on.

There are 2 things that would simplify this, from a maintenance perspective.

  • Powershell -- I wouldn't try to do this in a BATCH file, unless absolutely necessary
  • Chocolatey - Chocolatey is rough equiv to apt-get, but for Windows (and is PowerShell based). It can handle installing deps like Git and Ruby without a lot of extra code in the install procedure.

Here's an example of a similar installer that I wrote for a Windows / Graphite publishing tool called PerfTap

icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://raw.github.com/EastPoint/PerfTap/master/InstallPerfTap.ps1'))
Sindre Sorhus
Owner

:+1: PowerShell & Chocolatey

Since this is not landing until v2 we got some time to do it right.

Would be nice to get all the homebrew packages we require up on Chocolatey. We currently require: git, optipng, jpeg-turbo, phantomjs, of which it only has git. Any takers?

Ethan J. Brown

I already have a Powershell script to install PhantomJs locally for my team.. was actually thinking of doing the pull req for a new Chocolatey package since I think others would benefit.

Install is not too complicated, aside from being dependent on 7zip (which can be installed through Chocolatey)

#grab PhantomJS / unzip to temp dir, and move to program files
(New-Object Net.WebClient).DownloadFile('http://phantomjs.googlecode.com/files/phantomjs-1.6.1-win32-static.zip', "${Env:\temp}\phantomjs-1.6.1-win32-static.zip")
&"${Env:\ProgramFiles}\7-zip\7z.exe" x "`"${Env:\temp}\phantomjs-1.6.1-win32-static.zip`"" "-o${Env:\ProgramFiles}"

# Tweak environment variables
$Env:Path += ";${Env:\ProgramFiles}\phantomjs-1.6.1"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [EnvironmentVariableTarget]::Machine)

You can use COM and Windows Shell to extract zips, but I've found out the hard way that it's not supported on Server Core, which can make it painful if you have a Server Core build server (like us! ;0)

7zip will also be needed to extract the .tar.gz files for Yeoman itself, so...

Ethan J. Brown

FYI - Put in the pull request to Chocolatey for PhantomJS, OptiPNG and jpeg-turbo

ferventcoder/nugetpackages#53

Can probably tackle the script conversion tomorrow.

James M. Greene

Nice, love it. I was unaware of Chocolatey, that's pretty cool.

James M. Greene

Off-topic: Hey @ryanseddon, apparently you should take a look at Chocolatey (src) if you are still trying to streamline your Bunyip dependencies (e.g. Python) for Windows.

Ryan Seddon

Oooh thanks @JamesMGreene will do.

Sindre Sorhus
Owner

@Iristyle That was fast! Awesome :)

Ethan J. Brown

Will hack out install.ps1 now, and will basically mirror the functionality of install.sh as a first step for Windows install.

I'll raise one issue though with installing tooling dependencies like OptiPNG through Chocolatey. I generally try to avoid 'global' packages for small tooling packages like OptiPNG.

I can speak with some experience here, having spent a lot of time automating (for EC2 and for local dev bootstraps), and setting up source repos for my team so that code can be pulled and built with ease by both new devs AND the build server.

I generally draw the line, so that full language frameworks / runtimes are installed on the build server / dev box, and additional tooling should live in the repo (and should be pulled during first build by a package manager when we're talking about binaries). So for instance, I would expect Ruby or the .NET Fx SDK to be on the build server, but OptiPNG or libjpeg-turbo to be a dependency of the project.

Why?

  • Minimal global deps and a 'batteries included' approach promotes easier sharing
  • Tool versions should generally be fixed for a given build IMHO. With global deps (especially on Windows), this can be especially painful - as installing a global version of something may break other projects depending on a different versions
  • Maintaining extra dependencies on a build server is generally a pain; some people may not even have shell access to their build server. It's best to have all tooling setup isolated. Fortunately, I've scripted out creation of our Jenkins server for EC2 -- but any time a global dep is introduced, I have to make sure to script out it's install as well.
  • Managing global paths can be a pain, relative paths are generally simpler to use IMHO

You can see these same issues were recently raised with Grunt, and the 0.4.0 dev branch allows running locally from within node_modules.

I would rather see at least PhantomJS, OptiPNG and libjpeg-turbo installed locally as NPM packages when a project is yeoman init'd / npm install'd

However, I don't know if there are technical or philosophical reasons that these tools are not already packages in NPM? Maybe the authors have no interest in building from source with node-gyp, etc?

Rey Bango

Definitely onboard with this effort. I'm on vacation this week so my time is very limited but I'll be available next week to sync with you guys and help in any way I can.

Sindre Sorhus
Owner

I would rather see at least PhantomJS, OptiPNG and libjpeg-turbo installed locally as NPM packages when a project is yeoman init'd / npm install'd

I would too, but someone has to do it. Currently none of these can be directly installed through NPM.

James M. Greene

I raised a discussion about this with the PhantomJS group but it seems they're fundamentally opposed: https://groups.google.com/forum/?fromgroups=#!topic/phantomjs/tlQJzbCbrPI :)

Addy Osmani
Owner

We would really love for someone to take ownership of helping us get Windows support in place. Since #400, we've decided to no longer support automated install scripts and instead offer an audit script which lets developers know what they're missing and provides links to where to get these dependencies. For the reasons for this please see the issue but it might help simplify the amount of work needed to get this baby installed on Windows if anyone is willing to explore.

@paulirish if you have anyone else you think is worth reaching out to about Windows support it would be baller to get them involved too :)

Ethan J. Brown

I can do this as mentioned... but was waiting on @ferventcoder so that I don't have to maintain those packages myself - especially since he's automating package updates on accepted pull reqs. But if necessary, I can host / maintain those bits on my GitHub account and push them up to Chocolatey by hand.

ferventcoder/nugetpackages#53

From the issue you guys closed re: ShellJS (#382)..

Writing a bunch of dep checks in Powershell is not too hard.. but ShellJS has cross-platform tools like which that would be convenient for doing these types of checks and reusing the code. (Note Powershell / Windows doesn't have a which but you can fake it without too much trouble.) My main point being that the checks could be normalized / shared across all OSes instead of allowing them to diverge from one another.

Any thoughts?

Jeremy Burton

Got it working in windows as well, the same way mentioned at decodize. Was a very simple and quick install. Seems to work just fine for me. No issues so far.

Addy Osmani
Owner

@jermbo002 that's excellent to hear. @paulirish Looks like we've got Windows support :) We just need to get the deps captured in the audit. //cc @hemath

Ethan J. Brown

Chocolatey version is

Install Chocolatey

C:\> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

New Powershell prompt

#1.9.3
cinst ruby

cinst compass -source ruby
cinst nodejs.install
cinst gitextensions

#then as soon as they're available in Chocolatey - based on my pull req
cinst libjpeg-turbo
cinst OptiPNG
cinst PhantomJS

Of course, this could be wrapped up in a single script as well.

Updated with Robs info on installing Compass.

Rob Reynolds

cinst compass -source ruby ;)

Ethan J. Brown

Oh oh.. didn't realize that.. thanks Rob!

Rob Reynolds

If someone puts together a yeoman package (which I think is happening here?) - then set all of the dependencies to the above in the nuspec.
And in the package perhaps install compass. Or someone could create a compass package to call out to ruby to install it. Then you can just add it as another dependency to the nuspec. This would be cleaner IMHO.

In the end it's just
cinst yeoman

Ethan J. Brown

No one has talked about doing a Yeoman package yet.. but that seems the next logical step...

The only thing on top of wrangling the deps, would be to put npm install -g yeoman in install.ps1

Ethan J. Brown

FYI - I went ahead and put in the pull req to Chocolatey for Yeoman
ferventcoder/nugetpackages#57

This will install Yeoman and it's dependencies with a single command as Rob mentioned above (after Chocolatey is installed)

cinst Yeoman

James M. Greene

Yay! Yeoman for all.

praveen vijayan

@ addyosmani - everything seems to be working fine in windows.

Ethan J. Brown

@ferventcoder made a couple of tweaks to what I put together and now the yeoman package is available through Chocolatey

Addy Osmani
Owner

Thanks for confirming it works guys. Also for the work on getting this available via Chocolatey :)

Ethan J. Brown

A couple snags in the Chocolatey install on a clean machine (w/out Ruby or Node previously installed) -- working on straightening those out...

ferventcoder/nugetpackages#58

Christopher Froehlich

Followed the manual install instructions from decodize.com. Yeoman on Windows looks good so far.

Sindre Sorhus

@somecallmechief That's great. Let us know of any problems you run into ;)

Murilo da Silva

Installation with Chocolatey ok.
But yeoman build with problems!!
I create a folder and inside it type:
$ yeoman init
After I type:
$ yeoman build

And the following errors occurs:

File empty
dist/styles/[hash].main.css

After writing manifest log file a console error occurs:
Writing to manifest.appcache...
Error: /scripts/main.js Not Found
at Object.exports.error (C:\Users\usilvmu\AppData\Roaming\npm\node_modules\y
eoman\node_modules\connect\lib\utils.js:43:13)
at Object.errorHandler as handle
at next (C:\Users\usilvmu\AppData\Roaming\npm\node_modules\yeoman\node_modul
es\connect\lib\proto.js:190:15)
at exports.send (C:\Users\usilvmu\AppData\Roaming\npm\node_modules\yeoman\no
de_modules\connect\lib\middleware\static.js:157:11)
at Object.oncomplete (fs.js:297:15)
Error: Script error
http://requirejs.org/docs/errors.html#scripterror

Anyone?
This same problem occurs using the process described into:
http://www.decodize.com/css/installing-yeoman-front-end-development-stack-windows/

PS: Windows 7 32bits

Rob Reynolds

@murilobr Did you close the command line after you installed yeoman and then open another before running yeoman init and build? The other libraries are put on the path, but don't get recognized until after the next time you open a cmd prompt.

I just tried it without error.

Murilo da Silva

@ferventcoder My user variable PATH is:
C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Windows Live\Shared;C:\Program Files\QuickTime\QTSystem\;C:\DEV\ANT\apache-ant-1.8.4\bin;C:\Program Files\Java\jdk1.7.0_06\bin;C:/DEV/SDKs\bin;C:\DEV\ANT\apache-ant-1.8.4\bin;C:\Program Files\Git\cmd;C:\Chocolatey\bin;C:\Users\usilvmu\AppData\Roaming\npm\;C:\PhantomJS;

Yes, I closed the command line and opened again!
I test the same into a machine near me, with the same configuration and process, but the same error!

Rob Reynolds
C:\ruby187\bin; ::(or ruby something)
C:\Program Files (x86)\nodejs\;
C:\Program Files (x86)\Git\cmd;
C:\libjpeg-turbo64\bin;
C:\OptiPNG;
C:\PhantomJS;
C:\Users\username\AppData\Roaming\npm\;

From a command line type echo %PATH% > path.txt

Ensure it has all of those in there somewhere.

Murilo da Silva

@ferventcoder I uninstall everything and install again.
After installation, the PATH didn't have ruby path, but had all other ones.
I inserted the ruby PATH and the problem continues.

Typed echo %PATH% > path.txt:
C:\ruby187\bin;
C:\Chocolatey\bin;
C:\Program Files\nodejs\;
C:\Program Files\Git\cmd;
C:\Users\usilvmu\AppData\Roaming\npm\;
C:\libjpeg-turbo\bin;
C:\OptiPNG;
C:\PhantomJS;

See the command line log with error:
https://gist.github.com/3723320

Compass compilation doesn't give an error but main.css into dist/ directory is empty!

Murilo da Silva

Problem to call yeoman install jquery-ui
https://gist.github.com/3724084

My PATH:
https://gist.github.com/3724124

Paul Irish
Owner

hey @Iristyle can you summarize the window install procedure? I'm a bit confused between powershell, choclatey, nuget, and praveen's original instructions?

is the new method you guys hashed out described well here? http://www.decodize.com/css/installing-yeoman-front-end-development-stack-windows/#chocolatey

this is all incredible, btw. my hat is off to y'all.

Rob Reynolds

@paulirish - yep, that's it. If you already have chocolatey installed it is just

cinst yeoman

and then you wait for it to finish installing all of the necessary bits.

Addy Osmani
Owner

Fwiw, my vote would be for us to have a primary Windows installation doc that we can recommend for the average user with links to install instructions in the docs for more specific variations. I'd like to avoid the situation where someone wants to install and they go "Wait..there's 10 different ways to do this. Which one is the simplest?".

Thiago Santos

@addyosmani I agree. As for the install process, #chocolatey is the pimpliest I've found so far for Windows env. It's so simple it's stupid :) I'd also mention the original steps Praveen described on the blog for reference/documentation purpose.

Jeremy Burton

@addyosmani I agree there should be one standard way. If you have all of the dependencies already installed then cloning the repo and cd into \cli via the command prompt and running npm install -g is extremely quick and easy. It's 2 simple steps, clone and run.

However, if you don't have all the dependencies then the Chocolatey install seems like the way to go. Also 2 simple steps, install Chocolatey and yeoman. It's a little longer install process, but that's expected with the need for it to install ruby, node, compass, etc... This would be my vote for the simplest.

Gibran Castillo

@addyosmani I agree. As for install process, npm is the simplest.

Ethan J. Brown

@paulirish, yup - those instructions are accurate... Just so you understand a little about how it works

  • PowerShell is built on .NET and ships with Windows (.NET 2 by default up to Windows 8, .NET4 for Windows 8 and Server 2012)
  • Chocolatey is a Powershell based package manager for Windows, that co-opts the Nuget package manager format used to ship around .NET assemblies and tools (its basically a zip with an XML manifest that allows for dependency hierarchies). Remote scripts are not allowed to execute by default in a Windows Powershell session, but the 1-line Chocolatey installer launches Powershell with that disabled for the install session.
  • The Yeoman pkg simply has the list of various dependencies needed - I had it install Yeoman itself with npm install -g Yeoman rather than a Git clone.

Is the system as sophisticated as something like apt-get, or yum.. no.. but it's the best thing Windows has by a long shot -- give @ferventcoder a ton of credit for taking the initiative to build Chocolatey in the first place. It makes developers lives tons easier.

praveen vijayan

@paulirish - The original workflow is not changed. Chocolatey is not different from the original version. User still need all the software/tools mentioned in the original method. Chocolatey fetches the tools one by one and prompt the user to install it.

@Iristyle, @ferventcoder - Chocolatey is great & its simple.

But I think windows users prefer to have a native windows deployment method. User can click on a single installation file and it will fetch the tools & install it.

G. Hussain Chinoy

After missing the step to install yeoman-generators package from the npm on windows install, I tried the two-step Chocolatey cinst yeoman method (step 1: Install Chocolatey, step 2: cinst yeoman) - my only comments on it are that Chocolately doesn't seem to have an immediate way to specify install dirs for dependencies (I had Ruby 1.9.3 on my machine already, the yeoman Chocolatey pkg installed 1.8.7; same with node, git, PhantomJS, etc.)

I'll also add to the cheers on Chocolatey, it's fantastic. General Windows users will probably prefer a msi (WiX/NSIS), but I might suggest that such an installer install Chocolatey ;)

Here's the error I'd received after the yeoman windows cli install instructions (even after I'd git clone'd and npm -g install'd yeoman-generators)

c:\Software\yeoman\yeoman\cli>node yeoman.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'yeoman-generators'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (c:\Software\yeoman\yeoman\cli\yeoman.js:15:21)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
Ethan J. Brown

Yeah, I think that Chocolatey needs to add some sort of built-in guard functionality that can perform where checks on some given locations. This is non-trivial feature though, since checking PATH for binaries isn't always a safe way to detect something is installed -- sometimes it requires registry sniffing, etc. I'll add it as an issue to the tracker to see if there's a good way this can be solved.

G. Hussain Chinoy

@Iristyle Thank you, that would be great - I'm not psyched about having multiple installs (not to mention multiple versions of installs) of tools cluttering my system.

Rob Reynolds

@ghchinoy @Iristyle We are also implementing an Ignore Dependencies feature in the next release. While I understand this is not the same as the ability to see if packages are installed, it can help in areas where you have all of the prerequisites already installed.

Kevin Mårtensson
Collaborator

Has anyone run into any issues with image compression? I had a problem where the img task couldn't find optipng or jpegtran even if they were in my PATH.

Looking closer on the img task it looks like it searches for optipng and jpegtran in the folder vendor/, inside the yeoman/ folder specifically on Windows. I tested and it worked but it feels kinda fishy to manually move them there. Would be better if it used PATH on Windows too or if you were to include the vendor/ folder by default.

grunt.registerHelper('which', function(cmd, cb) {
  if ( !win32 || !/optipng|jpegtran/.test( cmd ) ) {
    return which( cmd, cb );
  }

  var cmdpath = cmd === 'optipng' ? '../vendor/optipng-0.7.1-win32/optipng.exe' :
    '../vendor/jpegtran-8d/jpegtran.exe';

  cb(null, path.join(__dirname, cmdpath));
});
Jhonatan Silva

Poderia ter uma versao para windows me ajudaria muito, so uso MAC no servico nao tenho em casa, se eu poder ajudar em alguma coisa eu ajudo....

Obrigado muito legal demais

William Oliveira
Collaborator

@JhonatanSilvaDeveloper Jhonatan, since the core developers and most of the others are not portuguese fluent, let's try to keep everything in english, than everybody will know what you are expressing.

Translating...

It could have a windows version, would help me a lot. I don't have a MAC at home, only at work. If I could help in something, I would help.

Thank you so much. That's so cool.

Sindre Sorhus

@kevva Sorry, as stated in the readme, Yeoman does not officially support Windows. We used to embed the Windows binaries, but don't anymore, the code hasn't been updated to reflect that, but will be after the 1.0 release.

Kevin Mårtensson
Collaborator

@sindresorhus yeah, I know. Just posted that as a temporary solution for the Windows people wanting to use Yeoman now instead of waiting for official support.

Sindre Sorhus

Also, pull requests are more than welcome if anyone wants to fix it now. But it's not a big priority for us until after 1.0.

Jhonatan Silva

Our very cool you have translated my comment ...
So okay, I'm waiting for the windows version ..
Thank you

Fitzchak Yitzchaki

What is the status of the http://chocolatey.org/packages/Yeoman package? Does it works?

I get the following error:


Chocolatey Runner (YEOMAN v0.9.0)


PowerShell (chocolateyinstall.ps1)


npm http GET https://registry.npmjs.org/yeoman
npm http 200 https://registry.npmjs.org/yeoman

npm ERR! Error: No compatible version found: yeoman
npm ERR! No valid targets found.
npm ERR! Perhaps not compatible with your version of node?
npm ERR! at installTargetsError (C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:486:10)
npm ERR! at next_ (C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:436:17)
npm ERR! at next (C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:413:44)
npm ERR! at C:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:406:5
npm ERR! at saved (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\npm-registry-client\get.js:151:7)
npm ERR! at Object.oncomplete (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.j
s:230:7)
npm ERR! You may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files (x86)\nodejs\\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\
\npm-cli.js" "install" "-g" "yeoman"
npm ERR! cwd C:\work
npm ERR! node -v v0.6.17
npm ERR! npm -v 1.1.21
npm ERR! message No compatible version found: yeoman
npm ERR! message No valid targets found.
npm ERR! message Perhaps not compatible with your version of node?
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\work\npm-debug.log
npm not ok

Mode LastWriteTime Length Name


d---- 09/27/2012 17:27 Yeoman
Yeoman has finished succesfully! The chocolatey gods have answered your request!


Executable Links (*.exe)


There are no executables (that are not ignored) in the package.

Chocolatey has finished installing 'Yeoman' - check log for errors.

Rob Reynolds

The package works - it looks like you are having a node package manager issue though. What version of node do you have installed?

Fitzchak Yitzchaki

I got it fixed, by deleting a few installed packages and re-run. Works great!
Are you updating the package for new builds?

Fitzchak Yitzchaki

@ferventcoder where yeoman.cmd actually exists on the disk? I need to full path in order to use the "Start external program" option in Visual Studio.

Fitzchak Yitzchaki

@ferventcoder where yeoman.cmd actually exists on the disk? I need to full path in order to use the "Start external program" option in Visual Studio.

Rob Reynolds

Since it comes with npm, it's located here:

%appdata%\npm

Rob Reynolds

As far as updating the package, sure.

Rob Reynolds

Now it is in the automatic packages repository, which means it will update on chocolatey.org within one day of the NPM package updating.

johnlindquist

I just did a fresh "cinst yeoman" install through Chocolately. "yeoman init" worked, but "yeoman build" hangs on the "compass:dist" task:

//begin console paste
C:\projects\yeoman-sandbox> yeoman build

We're constantly looking for ways to make yeoman better!
May we anonymously report usage statistics to improve the tool over time?
More info: yeoman.io/insight.html & http://yeoman.io

[?] [Y/n]: (Y)
Running "build" task

Running usemin target

  • intro clean coffee compass mkdirs usemin-handler rjs concat css min img rev usemin manifest copy time

Running "intro" task

Running "clean" task

Running "coffee:compile" (coffee) task
Unable to compile; no valid source files were found.

Running "compass:dist" (compass) task
//end console paste

compass is installed ("compass --version" outputs "Compass 0.12.2 (Alnilam)"), so I'm pretty stumped why it's just hanging...

Rob Reynolds

@johnlindquist is this still true after closing and reopening the prompt?

johnlindquist

Yes, I tried closing/opening the prompt (and restarting the computer). I also tried uninstalling ruby/node/etc, deleting the libs, then reinstalling. (This was during a clean install of Win8)

I wish there was some sort of log or something I could share with you, but it just hangs on 'Running "compass:dist"'. I can break out of the task and try over and over.

Rob Reynolds

I'm seeing that on yeoman 0.9.3. It wasn't doing that on prior versions. I would report this as a different issue. Thanks!

Rob Reynolds

I take it back, it finishes. It just took it a few moments to come back in my case.

johnlindquist

I've let it sit for 15+ mins. I'm going to try to reproduce on a clean install on another machine.

johnlindquist

Worked seamlessly (other than a path complaint about optipng) on a clean install on my laptop. I'll dig into what could be causing compass to freak out on my other machine.

Michael Stuhr

i installed yeoman via chocolatey (2 steps from here http://www.decodize.com/css/installing-yeoman-front-end-development-stack-windows/#chocolatey).
everything seemed to work (at least no errors were reported during the install).

after some heavy frickinaround with the PATH vars (i had to clean up alot; whoever invented the UI for windows shall rot in hell!) i could finally get yeoman via console (systemwide \o/ ).
but:
yeoman keeps asking me if i want to send usage statistics. every fucking time? :-)

anyway: i'm not going productive on this, cause whatever i do, i'm getting " Unable to find Gruntfile. Do you need any --help? "

what to do now?

Sindre Sorhus
Owner

yeoman keeps asking me if i want to send usage statistics. every fucking time? :-)

This was just fixed and a new release is going out today :)

what to do now?

Post some more info so we can help you debug it. And open a new issue. See contribution.md. Thanks :)

Michael Stuhr

So "chocolatey update yeoman" should do it right?

Post some more info so we can help you debug it.

i will let you know, when i installed the update

And open a new issue. See contribution.md. Thanks :)

uhm, i was under the impression that this actually /is/ the windows issue list.

Michael Stuhr

Oh btw: whoever striggles with chocolatey and needs to update some packages:

"cup " or if you can't remember the name "cup all".

Sindre Sorhus
Owner

uhm, i was under the impression that this actually /is/ the windows issue list.

No, it's general discussion about Windows support. It gets to noise with specific problems.

Michael Stuhr

ok, so i added an issue now: #620

dipaksaraf

I am trying to install Yeoman on Windows via various option available, and all seem to work fine, but whenever I am executing yeoman init, it doesn't seem to work. It is always opening up Dreamweaver in the frontend, or when I delete the association of JS file type of Dreamweaver, I get the error "Windows cannot open this file: yeoman.js. The path defined in the system is as follows:

C:\Ruby193\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Documents and Settings\DS\Application Data\npm\;C:\phantomjs\;C:\chocolatey\bin

Ethan J. Brown

Sounds eerily similar to the Grunt.js situation. With Grunt 0.4, Grunt.js has been renamed to Gruntfile.js, so that there was no conflict b/w launching Grunt the tool and having something in PATH try to edit / run Grunt.js.

gruntjs/grunt#110
http://benalman.com/news/2012/08/why-grunt/

In Windows, PATHEXT determines what file types to run -- this is kind of like a global chmod.

Since I don't actually use Yeoman, not sure if there is a Yeoman.js file in the same directory you're trying to run Yeoman? If so, this could be the issue...

dipaksaraf

@iristyle , yeah I am trying to run the same directory where yeoman has been installed, or from any other directory, and it seems the the code is getting executed. Now strangely the error has changed to this:

c:\directory where yeoman has been installed\yeomaninsight.py, line 185, Print 'Invalid number of arguments.'
SyntaxError: invalid syntax

I have installed Phyton version 3.3.0 or windows since the previous version i.e 2.7.3 was throwing an error during installation.

Any thoughts?

Kevin Mårtensson
Collaborator

The Python 3 issue should be fixed in the next release. See #636. For now you could just run yeoman with the --disable-insight flag. For example:

yeoman init --disable-insight
simonwoodhead

I have been trying to install Yeoman using Chocolatey. No errors were reported during installation and the PATH variable shows all of the directories listed in ferventcoder's post. I can initialize a new project and run a server which correctly watches for changes (which is great!). However when I try to build it freezes on copy and reports:

<FATAL> </FATAL>

Not the most helpful error message I know! Just wondering if anyone else has had this issue? I am on Windows 7 64 bit.

Matt Hardy

@simonwoodhead - I just got the same issue on Window 7 64-bit. I believe my problem was caused by an incorrect (custom) path to my angular.js file I referenced in index.html. I noticed the issue after an exception was thrown after executing "yeoman server" Traced the error to the bad path. Apparently the "copy" step in the build process broke when looking for that (incorrect) file path?

But then I ran build again, and it failed. Ran "yeoman server" one more time, stopped it and rebuilt. Worked as expected and copied compiled files into "dist" directory.

Hopefully something in there helps.

simonwoodhead

@mghardy Sorry for the huge delay...

I created a project with:

yeoman init quickstart 

and then immediately run

yeoman build 

Now it freezes consistently on:

NETWORK: 
*

I have tried reinstalling all the dependencies individually but unfortunately it still freezes at this point. I have resorted to installing Ubuntu on an old laptop on which Yeoman works perfectly!

I would really like to get this working on Windows. I am not clear which of the dependencies is responsible for the part where this is failing. Could somebody please point me in the right direction?

Many thanks,

Simon

Scott Wade
simonwoodhead

@sc0ttwad3 That was incredibly helpful, thank you. As you suggested the issue was related to PhantomJS. The hang is caused by the NVidia drivers on my system as described here: http://code.google.com/p/phantomjs/issues/detail?id=845

The hang is caused by the auto-selection of the GPU. Open the NVidia control panel and change the the preferred graphics processor to "Integrated graphics".

Hope that saves someone some time!

Simon

Scott Wade
Emanuele Ingrosso

I'm getting a strange problem. I've installed Yeoman on Windows 7 x64 by cloning the repo and run npm install -g.
The installation run without a error and if I type "yeoman" in console it shows me the options.

However, when I tipe "yeoman init" the console report:
"init is not yet integrated".

Other commands, like install or search did work.

Anyone has some tips?

Kevin Mårtensson
Collaborator

You've probably cloned the master branch of the repo which is not yet stable. Run npm install yeoman -g instead of cloning it from github.

Emanuele Ingrosso

You're right, didn't noticed that. Thanks for the hint, now it's working fine! :)

Wern Ancheta

Hi guys! I've installed yeoman via chocolatey as mentioned in this blog: http://decodize.com/css/installing-yeoman-front-end-development-stack-windows/

Everything went well when I executed cinst yeoman in the command line. But there were a few warn messages. yeoman build and yeoman server seems to be working fine but the sass files doesn't seem to be compiling on css on the dist directory. All I see is scss files which results to main.css not found error when I access the page in the browser.

praveen vijayan

Is your temp folder contains 'main.css' file? If you are getting warn like this - ENOTEMPTY, directory not empty '\temp' Use --force to continue. . Run 'yeoman build --disable-insight' one more time.

Thomas Kenny

The manual install page for Windows has

  1. Download and install Python 2.7.
  2. Add python to your system path. Add "C:\Python27;" to the PATH env variable. See these instructions.

but Chocolatey can install Python 2.7.3 and add it to the path, too! Maybe update the Yeoman Chocolatey package to include this? (Also, thanks for introducing everyone/myself to Chocolatey; what a useful thing it is.)

Rob Reynolds

Yeoman chocolatey package already takes a dependency on python. http://chocolatey.org/packages/Yeoman

Thomas Kenny

Wow, you're right! Didn't see it in the CLI log. Still probably a good idea to update the install instructions, though.

Edit: Gah, just realised it's a wiki. I'll do it.

Hamed Al-Khabaz

Came here to say how great chocolatey yeomen is. I was about to buy a mac or dual boot to fedora, but I guess not!

Marco Aurélio Dilda Campos

sorry for the nubish question, but ruby is only needed because of compass right?
and why is python a dependence too?

Hamed Al-Khabaz

Sublime text is coded in python and since yeomen is interacting with it, I believe it's a reason why you need python if it's not installed. Compass is also needed for SASS compilation, which yeomen does for you and gives you live refresh abilities with fast compilation.

Kevin Mårtensson
Collaborator

No, the reason Python is a dependency is because Insight needs it.

Marco Aurélio Dilda Campos
Fitzchak Yitzchaki

Can the chocolatey package be updated to Yeoman version 1 beta? Can it be currently supported on Windows?

Kevin Mårtensson
Collaborator

You shouldn't need Chocolatey anymore. Just type npm install -g grunt-cli bower yo and you should be good to go.

Emanuele Ingrosso

Anyway as stated in Yeoman's home-page, it doesn't actually works on Windows.

livedata

Hmm, i'm using yeoman under windows sience few months now, and i don't understand the problem ;-P The only one issue which was pretty small to me, that was phantom support, everything else, works perfectly - the only difference between windows and linux with installing yeoman is a way of installing some dependencies (like ruby) and heh... installing exe file isn't that difficult - really ;-D

James M. Greene

@livedata What issues have you seen with PhantomJS? I've used it directly on Windows for years now, and I contribute to the project.

Fitzchak Yitzchaki

I'd like to use Yeoman 1.0 which is seems to not support Windows. I'm guessing that you're using Yeoman 0.9.6 which is working bug is an old produce. Yeoman is something completetly else. See http://yeoman.io/.

I see that this PR need to merged, not sure what it wasn't.
yeoman/yo#3

Tom Lane
Collaborator
  • install node.js
  • install git for windows
  • run commands from git bash console
Addy Osmani
Owner

Could some folks that are currently using the 1.0 beta on Windows let me know how well that's going for you? Did our default install instructions work fine or have you been using a specific other set of installation instructions to get things running? Basically...I would like to know where we need to spend time improving Windows support :)

praveen vijayan

Yeoman npm install works fine on windows. Initially had some issues with imagemin and phantomjs. But default installation works fine now. I'm using 'yo webapps' for a while, but not tried angular. I'm on node v0.8.21.

emrecamasuvi

"yo webapp" was giving some namespace errors in windows. Today i tried default installation again; "npm install -g grunt-cli bower yo" and "npm uninstall -g yeoman"; voila! You can give happy news to win users now. Thank you.

Addy Osmani
Owner

@sindresorhus I would like to tweet out asking Windows users to try "npm install -g grunt-cli bower yo", "npm uninstall -g yeoman" and "yo webapp" just to verify this works for most people. Sound like a good idea?.

If so, we might consider including this news in the beta 4 post.

Sindre Sorhus
Owner

@addyosmani go for it.

Addy Osmani
Owner

Appears to have worked fine for most users but we've had one or two reports of grunt not correctly building after running yo webapp:

Sindre Sorhus
Owner

First one:

C:\Development\Projects\likeastore\tmp\app\components\jquery\jquery.js

It should be there, so maybe that person didn't run bower install?

Yves Laroche

1.0 beta3 is working fine for me on Windows with the instructions on yeoman.io. I'm currently testing the master branches of "yo" "generator" and "generator-webapp" under windows as well.

Kevin Mårtensson
Collaborator
kevva commented April 08, 2013

@addyosmani, also regarding the first one, Compass needs to be installed. Regarding the second one I can't spot any problems.

praveen vijayan

@addyosmani - I tried in another win 7 machine with node vv0.8.16 and got an error - npm ERR! cb() never called! [http://pastebin.com/29MnktRe line no:103]. In this machine compass is not installed. I got similar error like first link when I tried grunt.

Sindre Sorhus
Owner

npm ERR! cb() never called!, that's an npm bug, upgrade to latest Node.js and npm.

praveen vijayan

@sindresorhus Updated node to v0.10.3 and working fine now. In windows with latest node, compass and git yeoman will work.

Raphael Valerio

@addyosmani I have no issues with beta3 when following the Getting Started instructions to install and run yo webapp. I'm on Win 8 Pro 64-bit, with nodejs 0.10.3, git 1.8.1.msysgit.1, and ruby 1.9.3p392.

In order to track down issues with Windows users, I think it's important to make sure that you get the exact version of Windows, node, git, and ruby they have installed, and -- very important -- the terminal shell they're using. A lot of people don't seem to realize that trying to run commands from, say, Cygwin is not necessarily going to get expected results, since Cygwin installs and runs its own versions of things like Ruby. Frankly, I won't let Cygwin near my system anymore. In my case, I run all CLI stuff through Git Bash (msysgit), not just for Yeoman, but for everything in my development workflow. Git is a boon for us hapless Windows guys, because it helps bridge the gap a little between the cold, hard world of the NT kernel universe and you fancypants POSIX people, while being sensibly flexible.

yo webapp is pain-free, but I ran into problems with yo angular. I've got a list of error reports for that one -- should I post that here, or keep it outside this thread and get it to you separately?

jorpan
Pascal Hartig
Owner
passy commented April 09, 2013

Could you try to run yo webapp --skip-install? I suppose it's one of the bower install or npm install executions. Are bower and npm on your path, i.e. can you run npm and bower from the same shell?

jorpan
Yves Laroche

@jorpan I got the same error after the auto install of dependencies was added. I reported this yesterday here yeoman/generator-webapp#32 (comment)

I've been using the master branch and the webapp generator was working fine before this change.

Running "npm install & bower install" manually works though.

Kevin Mårtensson
Collaborator
kevva commented April 09, 2013

Related to joyent/node#2318. We could run something like this, which would solve this:

var win32 = process.platform === 'win32';
spawn(win32 ? 'cmd' : 'npm', [win32 ? '/c npm install' : 'install'], { stdio: 'inherit' });
spawn(win32 ? 'cmd' : 'bower', [win32 ? '/c bower install' : 'install'], { stdio: 'inherit' });

cc @sindresorhus @passy @addyosmani

Pascal Hartig
Owner
passy commented April 10, 2013
Addy Osmani
Owner

sgtm

Sindre Sorhus sindresorhus referenced this issue in yeoman/generator May 31, 2013
Closed

Add generators directory to lookups #212

Sindre Sorhus
Owner

Closing as we now support Windows. Feel free to open new tickets if you stumble upon an issue, but make sure it hasn't already been reported (also see closed issues).

Sindre Sorhus sindresorhus closed this May 31, 2013
Addy Osmani
Owner

As per our announcement back in April, we now officially support Windows as Sindre mentioned earlier. If you run into any new issues regarding Windows support please feel free to ping us on the #yeoman channel or open up a new issue on the relevant generator repo.

Robin Böhm

Great! :+1:

Tom Lane
Collaborator

:100:

Kevin Mårtensson kevva referenced this issue in yeoman/generator July 28, 2013
Closed

Improve conversion of args to string on win32 #245

Rob Wierzbowski robwierzbowski referenced this issue from a commit in robwierzbowski/yeoman.io February 05, 2013
Thomas Kenny Python 2.7 is now included in the Chocolatey package, so the Python i…
…nstallation instructions are moot. See yeoman/yeoman#216
5e87021
Rob Wierzbowski robwierzbowski referenced this issue from a commit in robwierzbowski/yeoman.io February 05, 2013
Thomas Kenny Python 2.7 is now included in the Chocolatey package, so the Python i…
…nstallation instructions are moot. See yeoman/yeoman#216
2cfa462
Eddie Monge eddiemonge referenced this issue from a commit in eddiemonge/yeoman.io February 05, 2013
Thomas Kenny Python 2.7 is now included in the Chocolatey package, so the Python i…
…nstallation instructions are moot. See yeoman/yeoman#216
8bac039
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.