i can not understand what wrong with my react native app /// - react-native

info Installing the app...
Task :app:stripDebugDebugSymbols FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
25 actionable tasks: 2 executed, 23 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
Unable to delete directory 'C:\Users\ANTOR ROY\Desktop\royapp\android\app\build\intermediates\stripped_native_libs\debug\out\lib' after 10 attempts
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 39s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
npm ERR! code 1
npm ERR! path C:\Users\ANTOR ROY\Desktop\royapp
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c react-native run-android
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ANTOR ROY\AppData\Local\npm-cache_logs\2021-03-02T09_18_41_856Z-debug.log

Related

When building a project using react native as an apk in Android Studio, the following error occurs

Task :packages:react-native-codegen:android:buildCodegenCLI
react-native-codegen#0.0.7 prepublish /tmp/tmp.Yy5pPOnaYt
yarn run build
npm WARN deprecated source-map-resolve#0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url#0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-url#0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix#0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN prepublish-on-install As of npm#5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.
sh: line 1: yarn: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! react-native-codegen#0.0.7 prepublish: `yarn run build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the react-native-codegen#0.0.7 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/csk882/.npm/_logs/2023-01-20T02_59_21_039Z-debug.log
> Task :packages:react-native-codegen:android:buildCodegenCLI FAILED
Execution failed for task ':packages:react-native-codegen:android:buildCodegenCLI'.
> Process 'command '/home/csk882/mt/metamask-mobile/node_modules/react-native/packages/react-native-codegen/android/../scripts/oss/build.sh'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
An error occurs when executing apk build in android studio
After building normally, the app should be deployed, but a build error occurred and it does not proceed any further.

Facing an error for #klarna/react-native-vector-drawable

FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':#klarna/react-native-vector-drawable'.
The project name '#klarna/react-native-vector-drawable' must not contain any of the following characters: [/, , :, <, >, ", ?, *, |]. Set the 'rootProj
ect.name' or adjust the 'include' statement (see https://docs.gradle.org/7.3/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization
.Settings:include(java.lang.String[]) for more details).
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbos
e flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! resure#0.0.1 android: react-native run-android
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the resure#0.0.1 android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I installed vector-icons,Clean the build but i didnot get any luck to fix it.

React Native error- Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'

I am getting following error which was working earlier perfectly but next day it start to throw this error.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
> Problems reading data from Binary store in C:\Users\wsguest\AppData\Local\Temp\gradle8528155178066901693.bin offset 38021 exists? true
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
npm ERR! code 1
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c react-native run-android
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\wsguest\AppData\Local\npm-cache\_logs\2021-05-18T00_30_03_793Z-debug.log
Any suggestion what could be reason for error?

nextjs Build failed because of webpack errors on CentOS 7

I want to deploy a nextjs application on a centos server. But when i try to build using npm run build it gives me the following error
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
info - Creating an optimized production build
Failed to compile.
ModuleNotFoundError: Module not found: Error: Can't resolve '../context/auth/AuthState' in '/var/www/html/projectname/pages'
> Build error occurred
Error: > Build failed because of webpack errors
at build (/var/www/html/projectname/node_modules/next/dist/build/index.js:15:918)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client-ubii-app#0.1.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client-ubii-app#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-03-31T21_10_01_066Z-debug.log
But when i do the same on my local machine runnig windows 10 it works fine
If you has been change in name of file or folder only case sensitive character, this problem may be happen if your remote branch is not updated. Please, make sure if remote branch has the old name of file or folder. If true, fix it because the CentOs is Linux, so file and folder with same words in lower case is different with upper case.

Execution failed for task ':app:validateSigningDebug'. in ReactNative

I am trying to run the app for the first time
C:\Users\Devrath\Desktop\React\ReactProjectFirst> npm run android
Question: Should I need to create a keystore for simply running a app
Error:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 855 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
> Task :app:validateSigningDebug FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
17 actionable tasks: 2 executed, 15 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file 'C:\Users\Devrath\Desktop\React\ReactProjectFirst\android\app\debug.keystore' not found for signing config 'debug'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 13s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file 'C:\Users\Devrath\Desktop\React\ReactProjectFirst\android\app\debug.keystore' not found for signing config 'debug'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 13s
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\Users\Devrath\Desktop\React\ReactProjectFirst\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\Devrath\Desktop\React\ReactProjectFirst\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Devrath\Desktop\React\ReactProjectFirst\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Command.handleAction (C:\Users\Devrath\Desktop\React\ReactProjectFirst\node_modules\react-native\node_modules\#react-native-community\cli\build\cliEntry.js:160:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! AwesomeProject#0.0.1 android: `react-native run-android`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the AwesomeProject#0.0.1 android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Devrath\AppData\Roaming\npm-cache\_logs\2019-08-12T11_38_19_074Z-debug.log
Please make sure you have executed it in this order.
Environment
Android Studio
Built-in emulator in Android Studio
Node Package Manager (NPM)
Node.js (Version 8 or newer)
React Native command line interface (React Native CLI)
Java Development Kit (JDK 8 or newer)
npm install -g react-native-cli
react-native init ReactProjectFirst
react-native run-android