Skip to content
Advertisement

Error while creating react-native app in linux

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

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.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement