React-native-vector-icons: Error: EPERM: operation not permitted, lstat 'D:\reactnative\MyBaby\node_modules \.staging\react-native-vector-icons-2612cf43\Fonts\Zocial.ttf'

Created on 1 Dec 2016  Â·  18Comments  Â·  Source: oblador/react-native-vector-icons

Error: EPERM: operation not permitted, lstat 'D:\reactnative\MyBaby\node_modules
.staging\react-native-vector-icons-2612cf43\Fonts\Zocial.ttf'

Most helpful comment

First, Go to android folder
cd android
Now clean the project...
gradlew clean //for Mac users, change gradlew to ./gradlew
Now run the build process again in the root folder
cd..
react-native run-android
Everything Now Looks ok

Look This Answer for More details

All 18 comments

You have a permission error it seems ¯_(ツ)_/¯

I have exactly same issue. I run command line as an administrator and still get this error. Can you help me with fixing this issues

This solution helped me.

Better to run command prompt always as an administrator, one could find the steps to achieve on windows 7/10 here - https://www.cnet.com/how-to/always-run-a-program-in-administrator-mode-in-windows-10/

Now my issue is also got fixed.

First, Go to android folder
cd android
Now clean the project...
gradlew clean //for Mac users, change gradlew to ./gradlew
Now run the build process again in the root folder
cd..
react-native run-android
Everything Now Looks ok

Look This Answer for More details

One issue I had is that my program was still running when I was trying to do ng build --prod

Close vs code and run the command through the cmd as admin solved to me.

Close vs code and run the command through the cmd as admin solved to me.

@Fl4v10
Had a similar error — regarding a completely different issue (webpack + kss-node + CleanWebpackPlugin).

Read your comment and thought closing all "open editors" might do the trick, and voila, no need to close "vs code".

This is a permissions issue. Just open your VS Code (or whatever you use) with Administrator privileges, or use your company option for it (might be another user or just another option when you right click .exe files). If this doesn't works, then check if there is another application using this folder, that might also block the access to your files and show up this same permissions error message.

I'm using Webstorm and for me, this was the only solution that fixed the problem

uncheck "File->Settings->System Settings->sychronization->use safe write"

https://stackoverflow.com/a/39325979

same issue but I did this.
"Run As Administrator on Note.js command prompt"
working well

Run cd android && gradlew clean

@Bradenb25 You saved my day two years later. hehehe

the problem for me was:
trying to run the command at VSCode terminal while i was running 'react-native run-android' at cmd
once i have terminated the cmd which runs 'react-native run-android' the problem gone.

i wish this help somebody

Just close and open your terminal again...Then run your command

run:
rm -rf $GRADLE_HOME/caches/build-cache-*
then restart the project

Just close and open your terminal again...Then run your command

:O Why did it actually help???

Was this page helpful?
0 / 5 - 0 ratings