1

I have installed node and checked it as the node js docs suggested by doing node -v and npm version and I got the same expected results as they showed in the docs

But I couldnt run npm install -g react-native-cli
This is the error that I get : This is the error that I get

3
  • You need to either use sudo before that command or chmod your /usr/lib/node_modules Commented Nov 15, 2017 at 10:27
  • man that worked u could have commented this as answer Commented Nov 15, 2017 at 10:37
  • Bojan Ivanac said the same thing as I said, validate their answer Commented Nov 15, 2017 at 10:38

1 Answer 1

3

You need to use

sudo chmod +rwx /usr/lib/node_modules

Or run your npm install as sudo but that's never a good idea.

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.