Ionic is Not Installing on Windows 7 - Getting Many Errors - android

I am getting this error while i am trying to install Ionic
$ npm install ionic cordova -g
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.2","npm":"2.14.7"})
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz
npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\delayed-stream\0.0.5\package.tgz
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "ionic" "cordova" "-g"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! path C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed
npm ERR! code UNKNOWN
npm ERR! errno -4094
npm ERR! syscall scandir
npm ERR! UNKNOWN: unknown error, scandir 'C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! error rolling back Error: UNKNOWN: unknown error, scandir 'C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed'
npm ERR! error rolling back at Error (native)
npm ERR! error rolling back { [Error: UNKNOWN: unknown error, scandir 'C:\Users\Sridhar\AppData\Roaming\npm\node_modules\ionic\node_modules\npm\node_modules\read-installed']
npm ERR! error rolling back errno: -4094,
npm ERR! error rolling back code: 'UNKNOWN',
npm ERR! error rolling back syscall: 'scandir',
npm ERR! error rolling back path: 'C:\\Users\\Sridhar\\AppData\\Roaming\\npm\\node_modules\\ionic\\node_modules\\npm\\node_modules\\read-installed' }
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Sridhar\npm-debug.log
Please help me to install Ionic

Please follow the below steps to install ionic.
IONIC Setup
Setup Environment (Installations)
Install Node.js
a. http://nodejs.org/download/
install ionic framework
a. $ npm install -g cordova ionic
install android SDK and set environment variables
a. Set following environment variable
b. set ANDROID_HOME=C:\\android-sdk-windows
Install Android Target 19 (follow following steps)
Open the SDK Manager (typing android into the terminal, assuming it's in your file path)
Selected box next to Android 4.4.2 (API 19)
Clicked button Install 8 packages
Install ant using CMD window
npm Install -g ant
a. Add following path in environment variables (PATH):
C:\Users\user.name\AppData\Roaming\npm\node_modules\ant\ant\bin
Once you setup the ionic environment.
Create the basic application for testing.
Open node.js command prompt
ionic start myApp tabs
cd myApp
ionic serve (it will open the application in browser)
ionic platform add android (replace ios with android if you want to add iOS platform)
ionic build android (replace ios with android if you want to build in iOS platform)
ionic emulate android android (replace ios with android if you want to emulate iOS platform)
NOTE: If ERR occurs, follow below link:
installing ionic npm ERR! tar.unpack error

Have you followed the right installation sequence ?
Install or update Node.js
Download the most recent version of Node.js. If you are running an older version of Node, make sure to update it because older versions had issues with npm.
As with the other commands, nodejs should now function in cmd.exe but just to be careful, add the full path to the bin folder in Node to your PATH, which will look something like C:\Program Files\nodejs\bin
Install Cordova
Open a new cmd.exe window, and run:
$ npm install -g cordova
Install Ionic
$ npm install -g ionic
Find the official installation doc and this too for more.

Related

Error while trying to install ionic on ubuntu 18.04

How to install ionic 4 in ubuntu 18.04.Which version of npm nodejs cordova android sdk should go hand in hand for installing ionic 4 on ubuntu 18.04.Please do help me.I tried installing but i am getting error when i run the project.
npm ERR! Linux 4.15.0-20-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code Unknown system error -122
npm ERR! errno -122
npm ERR! syscall close
Try this script: Ionic Cordova installer for Ubuntu
Its will Automatically install all required things. Your just have to update after this script.

Unable to start react native app

Guys I am Stuck here I have downgrade both my node and npm in order to run the application
currently my node version is 8.4.0 and npm is 4.6.1
Steps I did are
create-react-native-app SampleApp
cd SampleApp
npm run ios
And the result app is not working
Purushothams-MacBook-Pro:SampleApp Purushotham$ npm run ios
SampleApp#0.1.0 ios /Users/Purushotham/Desktop/Demo/SampleApp
react-native-scripts ios
21:59:37: Starting packager...
21:59:39: Error starting packager: Error: EACCES: permission denied, open '/Users/Purushotham/Desktop/Demo/SampleApp/.expo/packager-info.json'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! SampleApp#0.1.0 ios: react-native-scripts ios
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the SampleApp#0.1.0 ios 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! /Users/Purushotham/.npm/_logs/2017-11-12T16_29_39_085Z-debug.log
After executing sudo chmod -R 777 ~/.expo/ and installing expo.io application in my macbook it gets stuck like thi. you can see the below picture

react native error when install native-base or any

I'm a React Native beginner. I'm having an issue that after I create a project by command react-native init myapp and it is success but when I install native-base
by command npm install native-base --save that has error as following:
npm ERR! code ENOGIT npm ERR! No git binary found in $PATH npm ERR!
npm ERR! Failed using git. npm ERR! Please check if you have git
installed and in your PATH.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\myPC\AppData\Roaming\npm-cache_logs\2017-09-27T09_38_57_379Z-debug.log
I have checked and search google but I cannot find solution to fix it.
I also have installed Git
Help me to fix this. Thanks

ionic 2: ionic run android shows error

i have error when i run "ionic run android" or "ionic build android" in my ionic 2 app
this is the error i get. i just tryinh to see my app in the emulator of android.
i tried to make new ionic 2 project but it's the same problem.
Running 'build:before' npm script before build
> ionic-hello-world# build C:\Users\Adir\MyApps\tasklist
> ionic-app-scripts build --rollup ./config/rollup.config.js
[20:16:33] ionic-app-scripts 0.0.30
[20:16:33] build prod started ...
[20:16:33] clean started ...
[20:16:33] clean finished in 24 ms
[20:16:33] copy started ...
[20:16:33] ngc started ...
[20:16:33] lint started ...
[20:16:33] copy finished in 182 ms
[20:16:34] lint finished in 770 ms
[20:16:52] ngc finished in 18.71 s
[20:16:52] bundle prod started ...
[20:16:52] bundle prod failed: Could not resolve entry (/app/main.prod.ts)
[20:16:52] Error: Could not resolve entry (/app/main.prod.ts)
at C:\Users\Adir\MyApps\tasklist\node_modules\rollup\dist\rollup.js:8635:28
at process._tickCallback (internal/process/next_tick.js:103:7)
Error running ionic app script "build": Error: Could not resolve entry (/app/main.prod.ts)
npm
ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.7.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world# build: `ionic-app-scripts build --rollup ./config/rollup.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ionic-hello-world# build script 'ionic-app-scripts build --rollup ./config/rollup.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!
ionic-app-scripts build --rollup ./config/rollup.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Adir\MyApps\tasklist\npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
C:\Users\Adir\MyApps\tasklist>
This has been a common issue lately with ionic and A2 and resolving main.prod.*Try updating you app scripts for the project.
npm install #ionic/app-scripts#latest
Your error message should change after that with what is actually causing your build to crash. If the error message changes please update your question with the new message.
Checkout this out as well for more information on this issue: Ionic forum
Close all ionic folders and serve or lab. And try again, ionic cordova build android.
First of all, Check the version of Android in package.json file.
Now remove platform with this command (ionic cordova platform rm android)
After that addd the platform with this command (ionic cordova platform add
android#6.4.0). Where 7.0.0 is not stable version so use 6.4.0
Now, run this command (ionic cordova run android) or in mac (sudo ionic cordova run android)
Try out below command
$ cordova clean android
$ cordova build android
$ ionic cordova build android
There is a path setup problem in your system.
1st check npm version using CMD: npm -v
If it shows version number then use below code, otherwise 1st setup your npm path, you can use gitbash cmd, nodejs cmd
Try to use
ionic cordova run android
or
ionic cordova platform remove android
ionic cordova run android
If you have MAC system must use sudo like
sudo ionic cordova run android

Android UI automation test with appium

I just working on android UI automation test in few weeks. I tried with robotium in a time and now I want change to appium framework. And my question are:
I read that appium is a test tool to test webview application. So how about the other app that is not webview app?
Can I run test from appium on genymotion?
Any other tool do I need to install with appium(selenium or something)?
Edit
When I try to install appium with out sudo I got this error
ERR! Error: EACCES, unlink
'/Users//appium/node_modules/.bin/instruments-client.js'
npm ERR! { [Error: EACCES, unlink
'/Users//appium/node_modules/.bin/instruments-client.js']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path:
'/Users//appium/node_modules/.bin/instruments-client.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.1.0
npm ERR! command "/usr/local/Cellar/node/0.10.26/bin/node"
"/usr/local/bin/npm" "link" "appium-uiauto"
npm ERR! cwd /Users/yaphatak/appium
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! path
/Users//appium/node_modules/.bin/instruments-client.js
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink
'/Users//appium/node_modules/.bin/instruments-client.js'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users//appium/npm-debug.log
npm ERR! not ok code 0
Then I try with sudo then run appium I got this error
error: Appium will not work if used or installed with sudo. Please
rerun/install as a non-root user. If you had to install Appium using
sudo npm install -g appium, the solution is to reinstall Node using
a method (Homebrew, for example) that doesn't require sudo to install
global npm packages."
Any help?
1- Yes, Appium can test non-webview apps. The first line on the Appium introduction page says:
Appium is an open-source tool you can use to automate mobile native, mobile web, and mobile hybrid applications on iOS and Android platforms.
2- Yes, Appium should work with Genymotion. See here for an example.
3- Your tests will need to reference the Selenium libraries in order to communicate with Appium.

Categories

Resources