Rectangle 27 12

Finally got this working by changing the directory before running this.installDependencies() in index.js, as in:

this.on('end', function () {
  if (!this.options['skip-install']) {

    // Change working directory to 'gulp' for dependency install
    var npmdir = process.cwd() + '/gulp';
    process.chdir(npmdir);

    this.installDependencies({
      bower: false,
      npm: true
    });
  }
});

Hope this helps if you have a different project scaffolding setup.

Alternatively, you could also run any shell command (*nix or windows) using this.spawnCommand("npm", ["install"], { cwd: 'scripts'}) where cwd points to the directory you wish to run your command from.

Yeoman Generator: Installing project dependencies in custom folder - S...

yeoman yeoman-generator
Rectangle 27 10

I ran into various problems like this on both Ubuntu 12.04 and CentOS 6. I was running the latest version of npm on both, but no luck - lots of errors.

sudo npm install n -g
sudo n stable
sudo npm install -g yo
sudo chmod -R myusername .npm

(.npm and everything under it was owned by root, causing trouble when running yo generators).

Worked for me as well. I would mark it as an answer.

npm - Error Installing Yeoman on ubuntu - Stack Overflow

ubuntu npm yeoman
Rectangle 27 10

I ran into various problems like this on both Ubuntu 12.04 and CentOS 6. I was running the latest version of npm on both, but no luck - lots of errors.

sudo npm install n -g
sudo n stable
sudo npm install -g yo
sudo chmod -R myusername .npm

(.npm and everything under it was owned by root, causing trouble when running yo generators).

Worked for me as well. I would mark it as an answer.

npm - Error Installing Yeoman on ubuntu - Stack Overflow

ubuntu npm yeoman
Rectangle 27 1

As Vohuman pointed out, running this as sudo would fix it. You're trying to install the packages globally which requires access to /usr/local which you don't have write privileges to, so as the error message says, please try running this command again as root/Administrator.

sudo npm install -g ...

Otherwise was still executing as user, possibly the directory owner?

yeoman - Error when I run "npm install -g yo bower grunt-cli gulp" com...

npm yeoman
Rectangle 27 1

I was getting all kinds of crazy errors even after applying the fixes above, finally I ran "chmod -R 777 /home/[moi]/.npm, and it now runs without any errors.

node.js - Lots of "npm ERR!"s when running `yo angular` - Stack Overfl...

node.js angularjs yeoman yeoman-generator
Rectangle 27 1

I had this same problem on a version of node that I installed with brew and then upgraded (several months later) using brew upgrade node. I fixed it by running brew uninstall --force node to remove all the versions of node and then running brew install node and npm install -g yo generator-kraken bower grunt-cli again. This may have happened as a result of having multiple versions of node installed, as reported by brew when I attempted to unistall node the first time (output below).

brew uninstall node
Uninstalling /usr/local/Cellar/node/4.2.1... (2738 files, 36M)
node 0.10.29 is still installed.
Remove them all with `brew uninstall --force node`.

npm - yeoman generator fails: "Cannot find module 'download'" - Stack ...

npm yeoman-generator
Rectangle 27 2

I had the same problem and got it running. There is a version conflict with compass and sass both of which are needed by the framework you installed via the yo command.

ruby - I am trying to create sample app using yeoman and backbone but ...

ruby node.js backbone.js gruntjs yeoman
Rectangle 27 2

I had the same problem and got it running. There is a version conflict with compass and sass both of which are needed by the framework you installed via the yo command.

ruby - I am trying to create sample app using yeoman and backbone but ...

ruby node.js backbone.js gruntjs yeoman
Rectangle 27 1

Add the dependencies in the package.json files inside your generator.

this.installDependencies()

Thanks, Simon. Where exactly do I call this.installDependencies? I assume in the index.js file, but where and how?

Okay, never mind, I just wrote it like that at the end of my writing: function and it worked! Please let me know, though, if that is not optimal. Thanks again!

You can call it anywhere, it'll just schedule the installation to the end of the process no matter what.

npm - Yeoman custom generator automatically install gulp + dependencie...

npm gulp yeoman yeoman-generator
Rectangle 27 1

The folder containing the generator must begin with "generator-". For instance, if you generator is called my-generator, then the folder should be called generator-my-generator. It's a bit awkward, because after running npm link, I could use my generator by running "yo my-generator", but running npm test failed (until I renamed the folder).

Hope it would help others in the future...

node.js - npm test fails for custom yeoman generator - Stack Overflow

node.js npm mocha yeoman yeoman-generator
Rectangle 27 2

It fixed it by running this command, which installs the latest version from GitHub:

$ npm install -g git://github.com/iamblue/generator-angular-ui-router.git

I had tried all the others - for Windows your solution was the only one that worked

node.js - generator-karma does not satisfy its siblings' peerDependenc...

node.js angularjs generator yeoman karma-runner
Rectangle 27 2

I can install yeoman but after running install for generators, they don't work: $ yo angular Error angular

You don't seem to have a generator with the name angular installed. You can see available generators with npm search yeoman-generator and then install them with npm install [name]. To see the 0 registered generators run yo with the --help option.

Tried a couple other generators, none work so not just an issue with angular.

Can you tell me after doing gulp serve and launching the preview which url should i put to view my changes?

localhost:3000

linux - Install Yeoman on C9.io - Stack Overflow

linux cloud9-ide yeoman
Rectangle 27 0

The main error - is with "unknown" $routeProvider. Check if ngRoute module has been loaded. Also check that you propely injected it to your testApp module. It would be great if you could provide your testApp code.

Also I guess that you have an error with regex (no escape symbol)

/home/user/angular/test/mock/**/*\.js

node.js - Yeoman - generator-angular error at init app deployment - St...

node.js angularjs yeoman yeoman-generator
Rectangle 27 0

Grunt is running in the root folder of your application tree, so although you were on the right track modifying the watch object, you will need to add <%= yeoman.app %>/ before your css/*.css so it will look in the correct folder. yeoman.app is actually just a variable located towards the top of the file.

To test your app, use grunt serve and that shouldn't overwrite your index file. Otherwise, find the section in your Gruntfile.js where grunt.registerTask('serve' is defined, locate the grunt.task.run and try commenting out each task and re-running grunt serve to find the culprit that is overwriting your index file.

javascript - Yeoman Angular.js/Express.js - Grunt overwrites index.htm...

javascript angularjs yeoman yeoman-generator
Rectangle 27 0

Depending on your doctype you might be giving the wrong meaning to the "closing" slash. by default, yeoman generator and angular-seed use <!doctype html> (html5)

<foo />
<foo>

Depending on the browser implementation, it will add automatically a closing tag in one place or another, just like when you leave bodyor strong open and read the rendered code.

javascript - Angularjs directive removes all content from parent div -...

javascript angularjs
Rectangle 27 0

npm install -g yo@1.2.0
npm install -g npm@1.4.3

yeoman error peerinvalid Peer generator-webapp@0.5.0 wants yo@>=1.2.0 ...

yeoman yeoman-generator
Rectangle 27 0

I had the same problem and got it running. There is a version conflict with compass and sass both of which are needed by the framework you installed via the yo command.

ruby - I am trying to create sample app using yeoman and backbone but ...

ruby node.js backbone.js gruntjs yeoman
Rectangle 27 0

The error you get has some issues related to proxy/ssl settings. Read this & this it may help resolve it.

Yeoman generator-generator giving error when running - Stack Overflow

yeoman yeoman-generator
Rectangle 27 0

May not be ideal, but I was able to get this working by giving Vagrant user ownership of my project directory.

sudo chown -R vagrant:vagrant /link/to/project

web - Using yeoman in VM causes error... - Stack Overflow

web yeoman yeoman-generator