react-native run-android, can not running on my phone - react-native

My react-native project running ios, but can't run my android phone. This is error code ;
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
Where:
Build file '/Users/haktan/Desktop/arsiv/node_modules/react-native-linear-gradient/android/build.gradle' line: 21
What went wrong:
A problem occurred evaluating project ':react-native-linear-gradient'.
Could not find method compileOnly() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUİLD FAILED
Total time: 55.675 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
I can't install react-native-linear-gradient. Error code;
Haktan-MacBook-Pro:arsiv haktan$ npm install react-native-linear-gradient --save
npm WARN eslint-plugin-react-native#3.5.0 requires a peer of eslint#^3.17.0 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN native-base#2.8.1 requires a peer of react#>=16.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN native-base#2.8.1 requires a peer of react-native#>=0.56.0 but none is installed. You must install peer dependencies yourself.
react-native-linear-gradient#2.5.3
updated 1 package and audited 29046 packages in 34.783s
found 2 vulnerabilities (1 low, 1 high)
run npm audit fix to fix them, or npm audit for details

Related

Why am i getting 'install peer dependencies' error when installing inertia.js within a vue.js project?

I want to use inertia.js within a vue.js app, but getting an error when following the default setup instructions:
npm install #inertiajs/inertia #inertiajs/inertia-vue3
error:
#inertiajs/inertia-vue3#0.5.2 requires a peer of vue#^3.0.0 but none is installed. You must install peer dependencies yourself.
i've tried previous versions and installing vue separately, but still getting same error. what am i missing? thanks
for anyone that encountered the same warning message, run this command to install peer dependencies and fix the warning: npm install --save-dev "vue#^3.0.0"

Unable to install 'node-red-contrib-tf-model' using NPM on windows10x64

I followed the tutorials below for the installation of the tensorflow model:
https://flows.nodered.org/node/node-red-contrib-tf-model
https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md
Steps taken:
I first installed the #tensorflow/tfjs-node inside Node-RED directly by running the following code:
C:\Users\username\.node-red\node_modules> npm install #tensorflow/tfjs-node#1.4.0
Ran npm install under C:\Users\username\.node-red\node_modules\#tensorflow\tfjs-node:
C:\Users\username\.node-red\node_modules\#tensorflow\tfjs-node> npm install
Finally ran npm install node-red-contrib-tf-model in the same directory:
C:\Users\username\.node-red\node_modules\#tensorflow\tfjs-node> npm install node-red-contrib-tf-model
Error that occured:
npm WARN node-red-contrib-tf-model#0.1.11 requires a peer of #tensorflow/tfjs-node#^1.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN #tensorflow/tfjs-node#1.4.0 No license field.
I have installed the correct tfjs-node version, and so why does this error occur?
Edit: Tried installing the module straight from Node-RED itself and got the following
ERROR:The specified module could not be found.
C:\Users\username\.node-red\node_modules\#tensorflow\tfjs-node\lib\napi-v6\tfjs_binding.node
When I checked the above directory it turns out that I do have the 'tfjs_binding.node'.
What am I doing wrong here? Can someone please help me out.

I can't open an existing react-native project

I get the following error when I run this command
react-native run-android
Configure project :react-native-onesignal
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Configure project :react-native-webview
:react-native-webview:reactNativeAndroidRoot C:\Users\VO\Desktop\xxxx\xxxx\node_modules\react-native\android
FAILURE: Build failed with an exception.
What went wrong:
Task installDebug' not found in project ':app'.
Try:
Run gradlew tasks to get a list of available tasks. 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
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
BUILD FAILED in 4s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
First check these:
Check that you have installed all your dependencies correctly or not.
react-native-webview and other plugins giving error then try to fix it.
Gradle version are important for specific plugin usage so check it also that you are using supported Gradle version.
Follow these steps:
Close all metro bundles
watchman watch-del-all && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
open Android Studio and open yourprojectname/android
Let Android Studio sync and if there any sync issue then fix it.
Go to File menu -> invalidate cache and restart
Before react-native run-android try to check you have open device or emulator
Check it with adb devices
Now try once.

Erro generate app in macOS

I'm with this message after create my app using this command: react-native init...
npm WARN react-native#0.56.0 requires a peer of react#16.4.1 but none was installed.
You are currently running Node v6.10.3 but React Native requires >=8. Please use a supported version of Node.
See https://facebook.github.io/react-native/docs/getting-started.html
/Users/gustavo/React-native/projetos/SmartPark/node_modules/react-native/local-cli/server/checkNodeVersion.js:43
And when i try by this command: create-react-native-app... in the end of the creation this message is showen
npm ERR! cb() never called!
Failed to install
What is this?
The version of react-native-cli is 2.0.1

CRNA project stuck at "Starting packager..."

I can't start any CRNA project because it gets stuck at "Starting packager", I tried many projects but the problem still remains.
It always gets stuck at "Starting packager..."
I'm using react-native#0.46.4 and expo#19.0.1 on ubuntu 16.04
PS: I even tried a blank project and starter projects so I think the problem is with CRNA itself.
Note
npm shows me an unmet dependency error with expo and react:
npm ERR! peer dep missing: react#>=15.3.1, required by lottie-react-native#1.1.1
npm ERR! peer dep missing: react#>=15.4.0, required by react-native-branch#2.0.0-beta.3
I tried these solutions but the problem remains: https://github.com/react-community/create-react-native-app/issues/203
The problem was fixed by running:
sudo sysctl -w fs.inotify.max_user_watches=10000
Run this command before running npm start or yarnpkg start
REF: https://forums.expo.io/t/packager-not-loading-on-linux/2034