yeoman / generator-backbone

Scaffold out a Backbone.js project
http://yeoman.io
638 stars 157 forks source link

Error when running generator #395

Closed MelanieMenard closed 8 years ago

MelanieMenard commented 8 years ago

Hello,

I run this command inside the directory where I want to scaffold my app (capsule is my app name)

yo backbone capsule --template-framework=handlebars

The following error happens

undefined
Out of the box I include HTML5 Boilerplate, jQuery and Backbone.js.
? What more would you like? (Press <space> to select)Twitter Bootstrap for Sass
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/generator-backbone/generators/app/templates/app/scripts'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:794:18)
    at Function.sync (/usr/local/lib/node_modules/generator-backbone/node_modules/mkdirp/index.js:71:13)
    at yeoman.generators.Base.extend.writing.setupEnv (/usr/local/lib/node_modules/generator-backbone/generators/app/index.js:305:14)
    at /usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:430:16
    at processImmediate [as _immediateCallback] (timers.js:383:17)
MelanieMenards-MacBook-Pro:capsule melaniemenard$ 

Please note undefined appears whether or not I specify the template, and the JS error happens whether I select twitter bootstrap or no extra at all.

I've never used Yeoman before so following tutorials to the letter. Any advice much appreciated.

Many thanks.

Melanie.

Htbaa commented 8 years ago

Happens for me as well (also never used Yeoman before, though it would be a good time to start...).

For me this happens on Ubuntu 16.04 running in a Vagrant managed VirtualBox VM.

bufface commented 8 years ago

Same error (Ubuntu 16.04):

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/generator-backbone/generators/app/templates/app/scripts'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:922:18)
    at Function.sync (/usr/lib/node_modules/generator-backbone/node_modules/mkdirp/index.js:71:13)
    at yeoman.generators.Base.extend.writing.setupEnv (/usr/lib/node_modules/generator-backbone/generators/app/index.js:305:14)
    at /usr/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:430:16
    at runCallback (timers.js:566:20)
    at tryOnImmediate (timers.js:546:5)
    at processImmediate [as _immediateCallback] (timers.js:525:5)
bufface commented 8 years ago

Hey @MelanieMenard could you solve this? I still have same behavior.

h4ck3rm1k3 commented 8 years ago

I am having this as well.

h4ck3rm1k3 commented 8 years ago

installing the generator-backbone locally resolved this, it was installed globally.

bufface commented 8 years ago

@h4ck3rm1k3 You're right. Thanks

eddiemonge commented 8 years ago

duplicate of #388

welt13 commented 7 years ago

I have a Mac and I have been able to install the backbone generator well. I have installed everything in a global way without sudo and it has worked.