离子安装在Ubuntu [英] ionic installation in ubuntu

查看:241
本文介绍了离子安装在Ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始学习离子框架,我的问题是我无法在ubuntu中安装离子框架。我的 Node.js 版本为 v0.12.7 npm 版本为 2.11。 3 。我按照 http://ionicframework.com/docs/guide/installation.html 链接,我收到以下错误:

 

安装 cordova code> root @ meutex-pc:〜#npm install -g cordova
npm WARN engine xmlbuilder@2.2.1:wanted:{node:0.8.x || 0.10.x}当前:{node:0.12.7,npm:2.11.3})
/ home / meutex / npm / bin / cordova-> / home / meutex / npm / 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,deepgraph1.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,tar1.0.2,npm@2.14.0,delova-js@4.1.0)

安装 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}(当前:{node:0.12.7,npm:2.11.3})
npm WARN engine xmlbuilder@2.2。 1:needed:{node:0.8.x || 0.10.x}(当前:{node:0.12.7,npm:2.11.3})
npm WARN installMany normalize-package-data与npm@1.3.4 ,但是在打包的树中找不到捆绑包

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

现在创建第一个离子应用程序:

  root @ meutex-pc:〜# b $ b TypeError:Invalid版本:在新的SemVer(/home/meutex/npm/lib/node_modules/ionic/node_modules/semver/semver.js:295:11)
处未安装
。 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)
在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)
在Module._compile(module.js:460:26)
在Object.Module._extensions。 .js(module.js:478:10)
at Module.load(module.js:355:32)
at Function.Module._load(module.js:310:12)
在Function.Module.runMain(module.js:501:10)
启动时(node.js:129:16)
在node.js:814:3

无效的版本:未安装(CLI v1.6.4)

您的系统信息:

Cordova CLI:未安装
Gulp版本:CLI版本3.9.0
Ionic CLI版本:1.6.4
Ionic App Lib版本:0.3.8
操作系统:Distributor ID:Ubuntu说明:Ubuntu 14.04.3 LTS
节点版本:v0.12.7

编辑 node.js v0.12.7 ,然后安装 node.js v0.10.x ,但仍然存在相同的问题,因此需要 node.js v0.12.x

解决方案

问题出在您的npm版本中。
请尝试npm install npm @ latest
这应该安装最新的npm。



一旦完成,请尝试npm install -g cordova。
希望我不晚了


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

解决方案

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

这篇关于离子安装在Ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆