Closed webjohnjiang closed 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'
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.
Check your permissions on the file system. Sounds like your npm permissions are not correct. Try searching on stackoverflow for how to fix them.
This is one of the top search hits on this error, it would be nice to post the resolution here.
The resolution is to fix your npm folder permissions.
I fixed it by installing it locally in the project.
which you probably have correct permissions for. Its like saying you fixed your car by driving someone elses
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
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"
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