yeoman / generator-backbone

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

Error: EACCES: permission denied, access '/usr/local/lib/node_modules/generator-backbone/node_modules/html-wiring' #388

Closed webjohnjiang closed 8 years ago

webjohnjiang commented 8 years ago

i dont know why it show this error. The generators in my mac is ok, but only this backbone can not work.

i have try use "yo backbone" or "yo then run a generator" , no ok. i have try to reinstall the generator-backbone by "yo" or "npm" , both method are not work

webjohnjiang commented 8 years ago

i also get this error: Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/generator-backbone/generators/app/templates/app/scripts/vendor'

webjohnjiang commented 8 years ago

i think the generator dir privillge has some problem. i find that the owner of generator-backbone/app/template/app is nobody:staff. when i use my account to execute "yo backbone" , i am not the nobody, so i have not permission to create some file.

eddiemonge commented 8 years ago

Check your permissions on the file system. Sounds like your npm permissions are not correct. Try searching on stackoverflow for how to fix them.

h4ck3rm1k3 commented 7 years ago

This is one of the top search hits on this error, it would be nice to post the resolution here.

eddiemonge commented 7 years ago

The resolution is to fix your npm folder permissions.

h4ck3rm1k3 commented 7 years ago

I fixed it by installing it locally in the project.

eddiemonge commented 7 years ago

which you probably have correct permissions for. Its like saying you fixed your car by driving someone elses

mteodori commented 7 years ago

the generator should be installed globally like any generator with npm -g install generator-backbone, without sudo if node has been installed on a mac via brew, is this the case? could it be some node package has been previously installed globally using sudo causing the permission before

webjohnjiang commented 7 years ago

the reason @mteodori says is right. maybe because i installed the yeoman by "sudo", and then i install generator by yeoman, so, the generator is belong to the user: "nobody".

so , i reinstall the yeoman without "sudo"