Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native - Constant errors like "Error: EPERM: operation not permitted, lstat ..."

Tags:

react-native

I am fairly new to React Native, and it appears my app is crashing prior to executing my primary app code, but I cannot figure out where. In VSCode, I see the following in my Output:

Error: EPERM: operation not permitted, lstat 'c:\Dev\myapp\android\app\build\generated\not_namespaced_r_class_sources\debug\r\com\bumptech\glide\integration\okhttp'
Emitted 'error' event on NodeWatcher instance at:
    at NodeWatcher.<anonymous> (c:\Dev\myapp\node_modules\sane\src\node_watcher.js:291:16)
    at FSReqCallback.oncomplete (fs.js:176:21) {
  errno: -4048,
  code: 'EPERM',
  syscall: 'lstat',
  path: 'c:\\Dev\\myapp\\android\\app\\build\\generated\\not_namespaced_r_class_sources\\debug\\r\\com\\bumptech\\glide\\integration\\okhttp'

I'm trying to figure out how to determine where this is coming from, and how to debug errors like this in the future.

like image 842
Chris Eaheart Avatar asked Jul 08 '26 23:07

Chris Eaheart


2 Answers

I also got same Error while working with react-native on windows.

I am not sure the root cause of this error but following the steps below helps me to solve the problem.

  1. On Android Studio go to File>invalidate Caches/Restart

  2. Terminate local react native server

  3. Then Run npx react-native start --reset-cache and npm run android

like image 108
cb_dev Avatar answered Jul 11 '26 15:07

cb_dev


worked solution #1

cd android
./gradlew clean
cd ..
npx react-native run-android

worked solution #2

npx react-native run-android

after complete giving you the BUILD SUCCESSFUL message. start metro server again

npx react-native start

press r

resources

http://bitstopixels.blogspot.com/2017/04/react-native-windows-10-eperm-operation.html https://stackoverflow.com/a/43217182/5509892

like image 31
مصطفى Avatar answered Jul 11 '26 15:07

مصطفى



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!