Pouyan Aminian
Pouyan Aminian

Reputation: 1

Error running node on Yosemite

Apologies in advance if this is a rookie question, I am brand new to Node.js and I am trying to learn. I have successfully installed Node on my laptop and added the folder to my PATH variable:

export PATH=$PATH:/usr/local/bin

However, when I try to run a simple program to test, I get the following error:

-bash: /usr/local/bin/node: Permission denied

I got it to work by granting 755 on /usr/local/bin but I am not sure if that is a good idea as it grants everyone read and execute rights on a bin directory!

Does anyone know of a better way to do this? Is my concern even justified?

Thanks in advance for your kind help.

Upvotes: 0

Views: 73

Answers (1)

Niki
Niki

Reputation: 1105

it is probably an owner issue, check this out: https://docs.npmjs.com/getting-started/fixing-npm-permissions

The last suggestion on using Brew is probably the best option.

Upvotes: 1

Related Questions