我的版本是:
安装ionic时发生的错误:
**jce010:~ Tareqalmasri$ sudo npm install -g ionic**
Password:
/
> node-sass@0.9.6 install /usr/local/lib/node_modules/ionic/node_modules/gulp-sass/node_modules/node-sass
> node build.js
`darwin-x64-v8-3.14` exists; testing
․․․․․․․․․․․․․․․․․․․․․․․․․․
26 passing (51ms)
Binary is fine; exiting
ionic@1.0.0 /usr/local/lib/node_modules/ionic
├── gulp-rename@1.2.2
├── gulp-concat@2.5.2 (through2@0.6.5, gulp-util@3.0.5, concat-with-sourcemaps@1.0.2)
├── gulp@3.8.11 (pretty-hrtime@0.2.2, interpret@0.3.10, deprecated@0.0.1, archy@1.0.0, minimist@1.1.1, v8flags@2.0.5, tildify@1.0.0, semver@4.3.6, chalk@0.5.1, orchestrator@0.3.7, liftoff@2.1.0, gulp-util@3.0.5, vinyl-fs@0.3.13)
├── gulp-minify-css@0.3.13 (memory-cache@0.0.5, through2@0.6.5, vinyl-sourcemaps-apply@0.1.4, bufferstreams@0.0.2, clean-css@3.0.10, gulp-util@3.0.5)
└── gulp-sass@0.7.3 (map-stream@0.1.0, gulp-util@3.0.5, node-sass@0.9.6)
当我输入离子-v时,我得到了
jce010:~ Tareqalmasri$ ionic -v
-bash: ionic: command not found
答案 0 :(得分:0)
最后,我找到了解决方案:)。
解决方案是应用以下命令:
sudo npm update -g cordova ionic
答案 1 :(得分:0)
Homebrew在我的案例中解决了它
我花了几个小时来安装离子,特别是在阳光灿烂的日子里感到沮丧>(
没有任何效果:
最终解决了所有问题:我使用“ Homebrew ”安装了节点。之后所有命令都完美无缺:
npm install -g cordova ionic
ionic start myApp tabs