Reputation: 61
i'm trying to install ionic but i'm failed to do that..i had install node.js but now these 2 things are not installing on my laptop. kindly help me as i don't know what to do in such condition. Following command i tried to use:
npm install -g cordova ionic
sudo npm install -g cordova ionic
npm install -g cordova
npm install -g ionic
Upvotes: 1
Views: 1726
Reputation: 1118
To add to Sam5487 answer. If you are behind corporate proxy, then you should first these commands with appropriate changes.
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Then
npm install -g cordova
npm install -g ionic
ionic start <your app name>blank --type=ionic1
ionic cordova platform add android
For web browser testing you can use
ionic serve
After you are happy with your changes
ionic build android
ionic emulate android
All related information can be found at
https://jjasonclark.com/how-to-setup-node-behind-web-proxy/ https://ionicframework.com/docs/v1/guide/preface.html
Upvotes: 0
Reputation: 679
To start developing an ionic project:
Prereqs
Include Git for Windows for windows which is what I assume you are using based on the image in your question. After you install Git (and npm which you also stated was installed) go to the directory where you want to create the project and run the following.
npm install -g cordova
npm install -g ionic
ionic start appName blank
cd appName
ionic platform add android
ionic build android
ionic emulate android
Also you can run in web browser using ionic serve
or a web browser with iOS and Android using ionic serve --lab
If you want to emulate the Android device, make sure you have a system_image installed of the device you want. Guide here to do that.
EDIT:
Run npm --v
and you should see the version you are running, if not then npm isn't installed correctly. Install it globally and run the process again.
Upvotes: 1