-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while clean android project #55
Conversation
source/index.js
Outdated
.then(() => options.getUpdatePods() && executeTask(tasks.updatePods)) | ||
.catch(() => { | ||
console.log( | ||
'❌ Examine output - error in either yarn cache clean, yarn install, or pod update' | ||
); | ||
}); | ||
} else if (options.getCleanAndroidProject()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a switch-case would fit better to prevent starting a cascade of else-if's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmadruga I'm not sure that I get what you mean. But I updated the logic here. Actually, updatePods
and cleanAndroidProject
requires node_modules
. So I just make sure that node_modules
existed then run cleanAndroidProject
and updatePods
. Please help review it. Thanks
.catch(() => { | ||
console.log( | ||
'❌ Examine output - error in either yarn cache clean, yarn install, or pod update' | ||
); | ||
}); | ||
} | ||
prepareNodeModulesTask |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this live inside the last thenable before the catch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pmadruga yes it can, but it will not be executed if options.getWipeNodeModules()
is false.
@Domeee just try my branch to see if it works for you
|
@r0b0t3d Thank you. Here are the results:
Besides those two findings, the cli ran without problems.
|
Issue
Error running 'clean android project': Could not read script '/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' as it does not exist.
Root cause
If
Wipe node_modules folder?
isYes
,node_module
will be deletedSolution
Make sure to execute
cleanAndroidProject
task afteryarnInstall