Ionic error when trying to run on android device - ionic4

When I run the command: ionic cordova run android
This error is showing up:
[ERROR] native-run was not found on your PATH. Please install it globally:
I also tried to run sudo npm i -g native-run but I'm getting the same error.

Related

Error when trying to do 'expo build:android'

In the Terminal I get the following error after running the expo build:android command:
Error: Can't find react-native in package.json dependencies
Error: react-native is not installed. Please run `npm install` or `yarn` in your project directory.
There is an error with your project. See above logs for information.Error: There is an error with your project. See above logs for information.
Terminal error picture
I have already tried to update npm version, npm install, and I also tried npm install -g eas-cli
Are there certain steps anyone thinks I should do?
Follow below guide
Delete node_modules folder in root folder
npm install (If you are using yarn use yarn install)

Failed to start the app. Run CLI with --verbose flag for more details

Error: Command failed: adb shell am start -n com.getgroceryapp/com.getgroceryapp.MainActivity
at makeError (F:\desuvit\projects\workingbranch\MobileApp\node_modules\execa\index.js:174:9)
node version: 12.4.0
npm version: 6.14.7
Using these command for running the app: 1)react-native run-android or npx react-native run-android
also same error
after i upgraded to v12.18.3(node version) also same error.
but i'm trying to run the project getting above error
please help me
advance thanks....
Open Android Studio File -> Project Structure -> Gradle Settings -> Gradle JDK
and set up as
Embedded JDK
This worked for me after trying so many other options.
If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues:
npm uninstall -g react-native-cli #react-native-community/cli

Expo fails to build, Request failed with status code 400

I'm trying to build a project in expo react native project.
My expo version is 3.2.2, sdkVersion is 35.
When I ran in cmd (on Windows 10)
set EXPO_DEBUG=true
expo build:android -c
I got:
Request failed with status code 400
Error: Request failed with status code 400
at createError (C:\Users\Jonny\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\Jonny\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\Jonny\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\adapters\http.js:237:11)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
I'm tried to update expo version, sdkVersion, the version in react, check for internet connection.
Expo login and logout works fine. I don't have any proxy in my network.
I don't have any clues for what search or how to fix this problem.
Seems was a error in expo-cli version 3.2.2.
The update 3.2.3 fixed for me.
I have fixed the issue by using this command
Move to your root folder then type this command in your terminal
npm install -g expo-cli
I had two versions of expo-cli installed (one via yarn global install expo-cli and one as a dev dependency in project yarn add -D expo-cli). This started working for me after I removed the global expo-cli:
yarn global remove expo-cli
and used the local version in my project instead:
yarn run expo-cli start
Run those following command, then we are good to go.
$ yarn global remove expo-cli && yarn global add expo-cli
$ rm -rf node_modules/ yarn.lock && yarn install
$ yarn run start

Error While run react-native run-ios. Error: Cannot find module 'metro-config'

I am running React-native Project by terminal using react-native run-is command. I want to run it in simulator. first I run npm install ,then react-native run-ios. It showing error
Error: Cannot find module 'metro-config'
Require stack:
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/util/Config.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/core/index.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/cliEntry.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/local-cli/cli.js
- /Users/tribond/Projects/JustHelper/justhelper2/node_modules/react-native/cli.js
- /usr/local/lib/node_modules/react-native-cli/index.js
You seem to have no Metro-config module installed. Install this module.
npm i metro-config --save-dev

-bash: npm: command not found error message when installing React Native CLI on Mac

I'm following the latest instructions 05/31/2017 on installing React Native on https://facebook.github.io/react-native/docs/getting-started.html#content.
I'm attempting to install react-native. I successfully installed Homebrew, Node, Watchman but when I tried installing React Native CLI with this command:
npm install -g react-native-cli
it gave me this error message:
-bash: npm: command not found.
I then used this command:
curl -0 -L https://npmjs.org/install.sh | sudo sh
and the terminal gave me this message:
enter image description here
I then tried running this code:
react-native init AwesomeProject
but got this error message:
-bash: react-native: command not found
can someone help me overcome this obstacle so I can successfully installing React Native CLI? Thank you.
I already checked out the following but to no avail:
Error when installed react-native-cli command not found
Path error while installing react-native (Command not found error)
-bash: react-native: command not found
** NOTE **
node -v gives me v6.10.1
but when i do this:
npm -v it says -bash: npm: command not found
I thought npm came with node. Is it possible that I do not have npm but have can have nodejs?
Run npm install -g react-native-cli again. You didn't have npm installed before, when you ran the curl statement, that installed npm, but you now need to install the react-native-cli.