demonk7
October 14, 2014, 11:42am
1
Hi everyone! I have a problem when it comes starting with ionic in osx. I’ll explain the steps I have taken and errors I found, to see if anyone can help me.
I installed node.js from this site: nodejs.org
Thereupon I executed these commands:
2.1. $ sudo npm install -g cordova ionic cordova
2.2. $ ionic start myApp tabs
2.3. $ ionic serve
And with this last order I can see the application running. but if I try to do this:
$ sudo ionic platform add ios
I get this error:
But, These are the versions of the programs I use:
cordova - 3.6.3-0.2.13
Ionic - 1.2.7
Xcode - 6.0.1 (6A317)
XAMPP - 1.8.3-3
Someone could help me solve my problem?
Thank you in advance.
First off, you shouldn’t need to use sudo
when adding a platform.
Do you have the xcode command line tools installed at all?
That was one of my problems. I had not installed (xcode-select --install). Now everything works fine (without using sudo), but when I run this command:
$ ionic add platform android
I get this:
Any idea to solve this error?
Thank you in advance.
ok, thank you, I’m going to tried right now!
Other question, is this response normal?
$ sudo npm install -g cordova ionic
npm WARN package.json github-url-from-git@1.1.1 No repository field.
Nope, that something that we should fix out our end. Nothing to worry about for you.
demonk7
October 16, 2014, 11:52am
7
Other problem, right now I want create a new project, and then I get this error:
Is this normal? Could you help me solve it?
1 Like
Nope, this is not normal.
Hmm, do you have git set up on your computer?
1 Like
no, I have sourcetree but I don´t know if this is that I need
demonk7
October 16, 2014, 1:51pm
10
Which is the command to install git and configure? Could you help me please?
You can install git from their site.
http://git-scm.com/
1 Like
demonk7
October 16, 2014, 2:10pm
12
Thanks, Other Question, When I installing in the first time this:
$sudo npm install cordova ionic ios-sim -g
I need used sudo?
felipew
October 16, 2014, 2:28pm
13
usually use sudo
when you are using npm to install things globally(-g option).
demonk7
October 16, 2014, 2:36pm
14
Then I can use this: $sudo npm install cordova ionic ios-sim
or this $npm install cordova ionic ios-sim -g
, It is the same, right?
felipew
October 16, 2014, 2:40pm
15
If you don’t use the -g, cordova, ionic and ios-sim, will be installed locally (on the current directory), then you should manually include them in your $PATH dir, if you don’t these tools won’t work properly.
IMHO use -g to install these tools to avoid some unnecessary headache.
demonk7
October 16, 2014, 2:43pm
16
ok @felipew , thank you very much!
demonk7
October 16, 2014, 2:46pm
17
@felipew , one question, do you know why I have this error?:
developer1-Mac-mini:~ developer$ ionic --version
1.2.8
Unable to save ionic data: /Users/developer/.ionic/ionic.config { [Error: EACCES, permission denied '/Users/developer/.ionic/ionic.config']
errno: 3,
code: 'EACCES',
path: '/Users/developer/.ionic/ionic.config',
syscall: 'open' }
felipew
October 16, 2014, 5:14pm
18
EACCES error usually are related to permissions in the related directory, can you check the permissions in this directory and see if developer haver read/write access ?
demonk7
October 17, 2014, 7:28am
19
perfect, thank you!! I have solved this problem too
1 Like
demonk7
October 17, 2014, 12:34pm
20
@felipew I have a little question, Do you know if the content of this file: “~/.bash_profile” it is correct?
export PATH=${PATH}:/Applications/Android\ Studio.app/sdk/platform-tools:/Applications/Android\ Studio.app/sdk/tools
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=${JAVA_HOME}/bin:$PATH
export PATH=/usr/local/bin:$PATH
export JAVA_HOME=“/usr/libexec/java_home -v ‘1.8*’”
export ANDROID_HOME=/usr/local/opt/android-sdk