pmadruga / react-native-clean-project

Automating the clean up of a React Native project
MIT License
1.19k stars 52 forks source link

Error while clean android project #55

Closed r0b0t3d closed 3 years ago

r0b0t3d commented 3 years ago

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? is Yes, node_module will be deleted

Solution

Make sure to execute cleanAndroidProject task after yarnInstall

Domeee commented 3 years ago

@pmadruga @r0b0t3d hey guys. thank you for your work on react-native-clean-project! i am a new user and the cli is failing for me because of this issue. any update on this matter?

r0b0t3d commented 3 years ago

@Domeee just try my branch to see if it works for you

yarn add -D https://github.com/r0b0t3d/react-native-clean-project.git
Domeee commented 3 years ago

@r0b0t3d Thank you. Here are the results:

Besides those two findings, the cli ran without problems.

npx react-native clean-project
[INSERT] [develop] Wipe iOS build folder? (Y/n) n
Wipe iOS Pods folder? (Y/n) n
Wipe system iOS Pods cache? (Y/n) n
Wipe user iOS Pods cache? (Y/n) n
Update pods? (Y/n) n
Wipe android build folder? (Y/n) y
🚫 Please select 'Y' for yes, or 'n' for no.
Wipe android build folder? (Y/n) y
🚫 Please select 'Y' for yes, or 'n' for no.
Wipe android build folder? (Y/n) Y
Clean Android project? (Y/n) y
🚫 Please select 'Y' for yes, or 'n' for no.
Clean Android project? (Y/n) Y
Wipe node_modules folder? (Y/n) y
🚫 Please select 'Y' for yes, or 'n' for no.
Wipe node_modules folder? (Y/n) Y
Update brew? (Y/n) n
✅  wipe android build folder task has finished running in 37ms.
✅  watchman cache clear (if watchman is installed) task has finished running in 29ms.
✅  wipe temporary caches task has finished running in 22ms.
✅  wipe node_modules task has finished running in 1s.
✅  yarn cache clean (if yarn is installed) task has finished running in 4ms.
✅  npm cache verify task has finished running in 44s.
Error running 'npm ci': npm
Error running 'npm ci':  WARN deprecated deep-assign@3.0.0: Check out `lodash.merge` or `merge-options` instead.

Error running 'npm ci': npm
Error running 'npm ci':  WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated

Error running 'npm ci': npm
Error running 'npm ci':  WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

Error running 'npm ci': npm
Error running 'npm ci':  WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added

Error running 'npm ci': npm
Error running 'npm ci':  WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

Error running 'npm ci': npm
Error running 'npm ci':  WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0

✅  npm ci task has finished running in 7s.
✅  yarn install (if yarn is installed) task has finished running in 4ms.
✅  clean android project task has finished running in 4s.