Skip to content
Home » react native EACCES: permission denied, lstat ‘node_modules\.bin\acorn’

react native EACCES: permission denied, lstat ‘node_modules\.bin\acorn’

To solve react native EACCES: permission denied, lstat ‘node_modules\.bin\acorn’ after installing react-native-paper . Follow below methods.

Use any of the below solutions to solve the error.

Solution 1:

The files that are being targeted are not accessible to the user profile you are using! else you might not be able to access root node Packages! You can run:

npm install
sudo chmod -R 777 /Users/your_name/{your node module path}

Follow the below solution if given permissions doesn’t work.

Solution 2:

Allow the present user to read all cache and the property folders including the files.

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

Solution 3 : If the above two solutions doesn’t seems to work then the npm-global may be absent. Create a custom folder and add it to path using:

sudo chown -R $(whoami) ~/.npm
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'

Now export the variables using:

export PATH=~/.npm-global/bin:$PATH
source ~/.profile

Hope the above solutions works.

Similar Errors:
ImportError: No module named py4j.java_gateway

Tags: