I just got a new macbook and installed node.js using the official installer.
For some reason I can only run node.js using sudo node
and not just node
. I double checked the $PATH and the path to node is in there.
nikke at Nicks-MacBook-Pro in ~
$ node
-bash: node: command not found
nikke at Nicks-MacBook-Pro in ~
$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/Users/nikke/.rvm/bin
nikke at Nicks-MacBook-Pro in ~
$ /usr/local/bin/node -v
-bash: /usr/local/bin/node: Permission denied
nikke at Nicks-MacBook-Pro in ~
$ sudo /usr/local/bin/node -v
v0.10.12
My colleague has the same computer and he can run node just fine without having to do sudo. Is this normal? What could I possibly do wrong? The installer didn't say anything about having to do sudo.
I am also having this problem with git, e.g. doing git commit
also says Permission denied
.
node
, right? What's the output ofls -l /usr/local/bin/node
?