2

Fresh init of a RN project with a fresh copy of React Native Full Pack in VSCode. I'm unable to get this new project to debug, but am able to get other projects to debug using the same methods. I've tried recreating the project and still no dice. I can use react-native run-android in a command prompt to get it to debug, but not VSCode. I keep getting this error:

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: EPERM: operation not permitted, lstat 'c:\Users\user\Documents\repos\app\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\android\support\asynclayoutinflater'
Emitted 'error' event at:
    at NodeWatcher.<anonymous> (c:\Users\user\Documents\repos\app\node_modules\metro\node_modules\sane\src\node_watcher.js:291:16)
    at c:\Users\user\Documents\repos\app\node_modules\graceful-fs\polyfills.js:282:31
    at FSReqWrap.oncomplete (fs.js:158:21)
[Error] Error: Error while executing command 'react-native.cmd run-android --no-packager': Error while executing command 'react-native.cmd run-android --no-packager' (error code 101)

I've also tried running the packager first, but it still default to a --no-packager run.

3
  • stackoverflow.com/a/55715163/6052427 can you try this steps Commented Apr 16, 2019 at 20:17
  • That doesn't help. Still get the same error. Commented Apr 16, 2019 at 20:58
  • how about running it with sudo? sudo react-native run-android for Mac or whatever command is there for windows? Commented Apr 21, 2019 at 7:00

3 Answers 3

1

Deleting and reinstall NPM packages seems to work some of the time. But a better way to fix this problem is to run gradlew.bat clean from inside the android folder of the RN directory, then rerun the packager and restart the app.

Sign up to request clarification or add additional context in comments.

Comments

0

install NodeWatcher. use this command in windows : npm install node-watch

also try this.

Comments

0

You can also clean your build cache and gradle cache.

For more detail about how to do it, check this article: How to clear gradle cache

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.