Using Yeoman on Windows 7

Quick intro for those new to Yo.

Yeoman is an application and work-flow that simplifies many tasks espoused by the modern web development community. Such tasks like, automated application testing, live reload in browser, CSS pre-processing, and CSS and JS minification / concatenation, etc.

When you install Yeoman, you end up with three main apps in your workflow,

  • Yo – The Yeoman app which facilitates scaffolding out applications and pre-configuring Grunt,
  • Grunt – is a build tool used to preview, test and build the final production version of your application,
  • and Bower – is a dependency manager.

You can learn more about Yeoman and it’s associated work-flow at

Installing Yeoman & Dependencies

When Yeoman was first released there was no Windows support, you had to have a Mac or Linux development environment. That’s changed thankfully and the rest of this article is about installing Yeoman, and it’s dependencies, in a Windows environment.

Yeoman’s dependencies include NodeJS and Git. If you plan on using pre-processing on your CSS you’ll want Ruby and Compass as well.

Step 1: Installing NodeJS

nodejsNode is a Javascript based server you run on your local system. You can use Node to serve entire websites, manage web-socket connections and so much more. For our purposes though, Yeoman uses Node to install components via a package registry called NPM and serve live-reload pages of your app while you’re developing.

1. Visit and click the “Install” button to download a Windows MSI installer.
2. Run the installer like you would any other Windows installer.

There’s so much more you can do with Node. In your spare time you should checkout these links:

Step 2: Installing Git

This workflow uses Git to manage downloads from NPM and Bower. You need Git installed even if you’re not using it for your project. If you already have Git installed, just skip this step.

1. Download Git from
2. Run the Git exe and keep the defaults.
3. When asked about “Adjusting your PATH environment” choose “Run Git form the Windows Command Prompt
4. On the next screen, “Choosing the SSH executable“, choose “Use OpenSSH
5. On the next screen, “Configuring the line ending conversions“, choose “Checkout Windows-style, commit Unix-style line endings
6. Clicking next will start the install process, just let it run.
7. When the installer completes, just click the “Finish” button.

Step 3: Installing Ruby

This is by far the most confusing… But not once you figure it out. If you’ve never at least heard of Ruby, you’re probably not a legit web developer. I don’t use Ruby myself, but it’s the language needed to run Compass, which I do use.
The install of Ruby on Windows is made easier by the RubyInstaller for Windows.

1. Download RubyInstaller – As of this writing 1.9.3 is the stable version, choose that.
2. Run the installer like you would any other Windows Installer.

Step 4: Installing Compass

Compass is a pre-processor for CSS which means you can write CSS the way you always wanted to, using variables, calculations, hierarchical structure, etc. Compass parses your files and outputs syntacticly correct CSS. You can learn more about Compass at

Compass is a Ruby Gem, a self-contained Ruby application, and as such you must install Ruby first (see step 3). In your command line, use the following commands:

$ gem update --system
$ gem install compass

Note: You must run your command line as Administrator or you’ll get errors.

Step 5: Installing Yeoman, Grunt & Bower

As long as you have installed the latest Node version, you’ll have the latest version of NPM and installing all three tools requires just one command line command:

$ npm install -g yo

If you have an NPM version 1.2.10 or older, then you’ll need to install Grunt and Bower separately using:

$ npm install -g grunt-cli bower

Next, let’s install a Yeoman generator. A generator is a preset project scaffold which when run will build out the files on your system for your use. Consider it a jump start on your project.
We’ll install the general “webapp” generator which will scaffold out a project containing HTML 5 Boilerplate, jQuery, Modernizr and Twitter Bootstrap.

$ npm install -g generator-webapp

Using Yeoman

Let’s run the generator! In your command line navigate to the directory you’d like to work on your project in. I often end up using something like: C:\\Users\ryanm\Documents\Projects\{myprojectname}. Now run:

$ yo webapp

yo_1Yeoman will run in interactive mode allowing you to confirm the scaffolding options for this project, just follow the prompts. Once all prompts are completed, yo will build out the files for the project. During the build out you’ll see lots of npm http requests as yo downloads the needed components.

I’m not going into details on using Yeoman, Grunt and Bower in this article, there are plenty of resources out there on that subject (see below links). If you have any unanswered questions, or suggestions, about the install though please leave a comment.

Yeoman Resources

5 thoughts on “Using Yeoman on Windows 7

  1. Hi Ryan,
    Thanks for this great post!
    as of today, is this still the same sequence of installing and can I in each step use the latest versions?

    1. @Matthy, I’ve not installed these tools in the last few months but yes, it should work the same. If you find anything different do let me know so I can update the post.

  2. This is how you setup yeoman on windows 7? This is how the command line look like? Where are the steps to set up PATH variables properly? In my opinion the title of the post should be Using Yeoman on linux and not Using Yeoman on Windows 7.

  3. I did the same but whenever I try to run “yo something” I get: “‘yo’ is not recognized as an internal or external command, operable program or batch file.”

    If I do “node yo” something, I get: “Error: Cannot find module ‘C:\Data\project\yo’
    at Function.Module._resolveFilename (module.js:325:15)”

    Tried to do “set NODE_PATH=%AppData%\npm\node_modules”

    But it didn’t change anything

Leave a Reply to Alexander Cancel reply

Your email address will not be published. Required fields are marked *