0

I start learning ionic-framework, my problem is I cannot install ionic-framework in ubuntu. My Node.js's version is v0.12.7 and npm version is 2.11.3. I follow http://ionicframework.com/docs/guide/installation.html link, I get the following error::

install cordova

 root@meutex-pc:~# npm install -g cordova
 npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"}    (current: {"node":"0.12.7","npm":"2.11.3"})
 /home/meutex/npm/bin/cordova ->/home/meutex/npm/lib/node_modules/cordova/bin/cordova
 cordova@5.2.0 /home/meutex/npm/lib/node_modules/cordova
 ├── underscore@1.7.0
 ├── q@1.0.1
 ├── nopt@3.0.1 (abbrev@1.0.7)
 └── cordova-lib@5.2.0 (valid-identifier@0.0.1, osenv@0.1.0,properties-parser@0.2.3, bplist-parser@0.0.6, unorm@1.3.3,   shelljs@0.3.0, semver@4.3.6, dep-graph@1.1.0, rc@0.5.2, elementtree@0.1.6, glob@4.0.6, cordova-registry-mapper@1.1.10, cordova-serve@0.1.2, aliasify@1.7.2, xcode@0.8.0, npmconf@2.1.2, plist@1.1.0, request@2.47.0, cordova-app-hello-world@3.9.0, init-package-json@1.8.0, tar@1.0.2, npm@2.14.0, cordova-js@4.1.0)

install ionic

 root@meutex-pc:~# npm install -g ionic
 npm WARN engine cordova-js@4.0.0: wanted: {"node":"~0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})
 npm WARN engine npm@1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":"0.12.7","npm":"2.11.3"})
 npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})
 npm WARN installMany normalize-package-data was bundled with    npm@1.3.4, but bundled package wasn't found in unpacked tree

 ...................................................................
 ...................................................................
 ...................................................................

Now create first ionic app:

 root@meutex-pc:~# ionic start test blank
 TypeError: Invalid Version: Not installed
   at new SemVer  (/home/meutex/npm/lib/node_modules/ionic/node_modules/semver/semver.js:295:11)
   at Range.test (/home/meutex/npm/lib/node_modules/ionic/node_modules/semver/semver.js:1049:15)
   at Function.satisfies (/home/meutex/npm/lib/node_modules/ionic/node_modules/semver/semver.js:1098:16)
   at Object.checkRuntime (/home/meutex/npm/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/info.js:295:32)
   at Object.run (/home/meutex/npm/lib/node_modules/ionic/lib/cli.js:54:10)
   at Object.<anonymous> (/home/meutex/npm/lib/node_modules/ionic/bin/ionic:9:10)
   at Module._compile (module.js:460:26)
   at Object.Module._extensions..js (module.js:478:10)
   at Module.load (module.js:355:32)
   at Function.Module._load (module.js:310:12)
   at Function.Module.runMain (module.js:501:10)
   at startup (node.js:129:16)
   at node.js:814:3

   Invalid Version: Not installed (CLI v1.6.4)

   Your system information:

   Cordova CLI: Not installed
   Gulp version:  CLI version 3.9.0
   Gulp local:  
   Ionic CLI Version: 1.6.4
   Ionic App Lib Version: 0.3.8
   OS: Distributor ID:  Ubuntu Description: Ubuntu 14.04.3 LTS 
   Node Version: v0.12.7

Edit: I also uninstall node.js v0.12.7 and then install node.js v0.10.x and still same problem and it require node.js v0.12.x

sabbir
  • 2,020
  • 3
  • 26
  • 48

3 Answers3

0

The problem is in your version of npm. please try "npm install npm@latest" this should install the latest npm.

Once its done, try "npm install -g cordova". Hope I am not late

Sumit
  • 1
0
1.Install nodejs by following command
sudo apt-get install nodejs
2.Check version for nodejs
node -v
2.Install npm 
sudo apt-get install npm
3.Check version for npm and nvm
npm --version
nvm -- version
4.Install cordova and ionic
npm install -g cordova ionic
5.Check ionic information
ionic info
Nithya
  • 52
  • 8
-1

Go to github clone the link to your directory: [ https://github.com/nraboy/ubuntu-ionic-installer ]

git clone https://github.com/nraboy/ubuntu-ionic-installer

after cloning, go to the directory - ubuntu-ionic-installer:

cd ubuntu-ionic-installer

sudo ./ubuntu-ionic-installer

Then get coffee and relax until the install is done you can

to check just type ionic in the terminal