Vedavyas Paruchuri
Vedavyas Paruchuri

Reputation: 11

Ionic is Not Installing on Windows 7 - Getting Many Errors

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 [email protected]: 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

Upvotes: 1

Views: 771

Answers (2)

Abdul Aleem
Abdul Aleem

Reputation: 709

Please follow the below steps to install ionic.

IONIC Setup

Setup Environment (Installations)

  1. Install Node.js

    a. http://nodejs.org/download/

  2. install ionic framework

    a. $ npm install -g cordova ionic

  3. 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)

  1. Open the SDK Manager (typing android into the terminal, assuming it's in your file path)
  2. Selected box next to Android 4.4.2 (API 19)
  3. Clicked button Install 8 packages

Install ant using CMD window

  1. 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.

  1. Open node.js command prompt
  2. ionic start myApp tabs
  3. cd myApp
  4. ionic serve (it will open the application in browser)
  5. ionic platform add android (replace ios with android if you want to add iOS platform)
  6. ionic build android (replace ios with android if you want to build in iOS platform)
  7. 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

Upvotes: 4

Anoop M Maddasseri
Anoop M Maddasseri

Reputation: 10539

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.

Upvotes: 0

Related Questions