Having attended a presentation on Yeoman at the FoWA conference in October, I recently decided to give it a go with an AngularJS application. I followed the Getting Started With Yeoman guide to install Yeoman and the angular generator (resulting in yo@1.1.2 and generator-angular@0.7.1) and then generate my application.
I hit problems straight off when I tried to run the tests using $ grunt test
: instead of it just working (as one might reasonably expect from something scaffolded), I got errors Warning: No provider for "framework:jasmine"!
and, when I fixed that, Can not load "Chrome", it is not registered!
. Unfortunately not all the necessary dependencies had been added. The solution was either to add karma-jasmine
and karma-chrome-launcher
dependencies manually, as suggested here (but being careful to perform the steps in the order in the text section of the answer, NOT the order of the code examples) or to generate a new config using $ karma init
.
Later that week, working on a Windows 7 64-bit machine rather than 32-bit, I found that generator-angular
didn’t even complete, giving me the error building is not supported on win32
. A suggestion on GitHub by meandnotyou seemed to work: track down the AppData/Roaming/npm/node_modules/generator-angular/templates/common/_package.json
file and change the grunt-contrib-imagemin
dependency from "~0.3.0"
to "0.2.0"
before trying to run the generator.
Hi Jennifer,
What command have you used to install yeoman on Windows 7.
I have been trying unsuccessfully for the past two days to get it working on two separate Windows 7 machines and I am getting the same errors related to npm. I tried
1. npm install -g yo,
2. Installed Chocolatey and run cinst yeoman
I am able to install 0.9.6 version of yeoman but angular generators don;t work with it.
Hi there, I just used the
npm install -g yo
command as shown on the Yeoman Getting Started page. (Using
npm
version 1.3.21, if that’s any help.)