0

So I am a little new to working in the terminal and trying to set up yo and a localhost environment. No matter what I do it keeps throwing a permissions denied error. I have installed node and npm already and when I run the yo install npm install -g yo bower grunt-cli gulp i get this error message. My buddy and I have tried so many different things to fix this but we cant get anywhere. I can access and run using sudo but I need to actually have the permissions to get this working. Help please?

I am sorry if that is not detailed enough, I am new to working in the terminal and may not know entirely what I am doing. If all else fails I was going to reset my desktop to factory settings and start over with setting my users and groups.

Screenshot of errors Here

Lindles
  • 1
  • 2
  • did you try use ```sudo``` ? https://docs.npmjs.com/getting-started/fixing-npm-permissions – Krzysztof Sztompka Oct 15 '15 at 18:46
  • yeah I tried sudo and thats the only way i can access or do anything, and I would prefer not to have to use sudo. – Lindles Oct 15 '15 at 18:55
  • @KrzysztofSztompka I tried the video tutorial which is awesome thank you. It worked in that I could install yo without using sudo. But when I try to run yo i still get an EACCES permissions denied issue. – Lindles Oct 15 '15 at 19:44
  • There is question and answer about EACCES in yeoman http://stackoverflow.com/a/31199516/4138339 – Krzysztof Sztompka Oct 15 '15 at 19:46
  • It says I only have staff access and I am the admin, how is that?? NATHANIELEs-iMac:Users BigTuna$ ls -l total 0 drwxrwxr-x+ 48 BigTuna staff 1632 Oct 15 13:29 BigTuna drwxr-xr-x+ 11 Guest _guest 374 Jun 16 2014 Guest drwxrwxrwt 7 root wheel 238 Oct 11 17:02 Shared drwxr-xr-x+ 16 imac staff 544 Oct 15 11:40 imac – Lindles Oct 15 '15 at 19:46
  • Im not a unix master (os x is also unix), but in os x by default you are not super user (roor user). Root user is disabled. You use normal user, and because that some actions need sudo permission. – Krzysztof Sztompka Oct 15 '15 at 19:54

1 Answers1

0
sudo chown -R `whoami` /usr/local

or

npm install npm -g

...will do the trick.

You're not the first one to experience those problems and they are (finally) actively addressed in npm@3.X.X

eljefedelrodeodeljefe
  • 6,304
  • 7
  • 29
  • 61