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 :
Advertisement
Answer
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.