question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnhandledPromiseRejection: Command 'clean android project' failed with code: 1

See original GitHub issue

Trying to use:

npx react-native-clean-project

Get the following error:

Screen Shot 2020-12-08 at 2 00 25 pm

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
apfrittscommented, May 20, 2021

This is because you have removed your node_modules directory and your build.gradle file requires a resource in order to load your project and then clean your project.

4reactions
Kailash23commented, Jun 5, 2021

@pmadruga

> cwingsdeliveryapp@0.2.1 clean
> react-native-clean-project

Wipe iOS build folder? (Y/n) Y
Wipe iOS Pods folder? (Y/n) Y
Wipe system iOS Pods cache? (Y/n) Y
Wipe user iOS Pods cache? (Y/n) Y
Update pods? (Y/n) Y
Wipe android build folder? (Y/n) Y
Clean Android project? (Y/n) Y
Wipe node_modules folder? (Y/n) Y
Update brew? (Y/n) Y
✅  wipe iOS Pods folder task has finished running in 29ms.
✅  wipe android build folder task has finished running in 24ms.
✅  wipe temporary caches task has finished running in 17ms.
✅  watchman cache clear (if watchman is installed) task has finished running in 36ms.
✅  wipe user iOS Pods cache task has finished running in 2s.
Error running 'clean android project': 

Error running 'clean android project': FAILURE: Build failed with an exception.


Error running 'clean android project': * Where:

Error running 'clean android project': Script '/Users/kailashuniyal/Desktop/cwings-delivery-app/node_modules/react-native-unimodules/gradle.groovy' line: 168
Error running 'clean android project': 

* What went wrong:

Error running 'clean android project': A problem occurred evaluating settings 'CwingsDeliveryApp'.

Error running 'clean android project': > 
Error running 'clean android project': /Users/kailashuniyal/Desktop/cwings-delivery-app/node_modules/expo-camera/unimodule.json


Error running 'clean android project': * Try:

Error running 'clean android project': Run with --stacktrace option to get the stack trace. Run with --info
Error running 'clean android project':  or --debug option to get more log output. Run with 
Error running 'clean android project': --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

❌  Command 'clean android project' failed with code: 1
node:internal/process/promises:245
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to clean project in Android Studio - java - Stack Overflow
Project directory is on a NTFS based drive. Whenever I try to clean my project I get something like below. :app:clean FAILED Error:Execution...
Read more >
After gradle update, my project is not building - Ionic Forum
BUILD FAILED in 1m 40s (node:5064) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command ...
Read more >
Known issues with Android Studio and Android Gradle Plugin
This page tracks known issues with Android Studio Dolphin | 2021.3.1 and Android Gradle plugin ... Error when using different passwords for key...
Read more >
can you help me with this gradle error please? run ionic ...
ionic cordova build android Running app-scripts build: --platform android --target cordova ... Command failed with exit code 1 Error output:
Read more >
Framework7 cordova build android error
I want to build my framework 7 app for testing and whrn i run this ... Error: Shell command exit with non zero...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found