Error: Eperm: Operation Not Permitted, Scandir 'C: /Users/. .. /Node_Modules/React-Native-Gesture-Handler/Android/

When I run: npx react-native run-android

It gives the error like this:

Error: EPERM: operation not permitted, scandir 'C:/Users/ . . . /node_modules/react-native-gesture-handler/android/...

when I ran Command Prompt as administration still giving the same error

2 Answers

Perform the below steps

  1. remove node_modules folder

  2. npm install react-native-gesture-handler

  3. in your App.js import the below line

    import 'react-native-gesture-handler'

  4. remove the build folder from android-> app -> build

  5. npx react-native run-android

As a result of my searches the problem was this react-native-gesture-handler, So some time just restart you computer the error will fix, if that is not fix by restarting the PC then uninstalled and after that reinstalled this dependency. no need to remove node_modules and reinstall all, now the problem fixed.

uninstall:

npm uninstall react-native-gesture-handler --save

install:

npm install react-native-gesture-handler --save

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest