0

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.

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.