When i use this in my terminal
ionic start my-app tabs --type=react
this happend:
[ERROR] react is not a valid project type.
Please choose a different --type. Use ionic start --list to list all
available starter templates.
I am pretty sure you need to install the correct tools
npm install -g #ionic/cli native-run cordova-res
Why not try out official docs tutorial??
https://ionicframework.com/docs/react/your-first-app
Related
I have been trying to use the ionic-native plugins provided by Ionic 3. When I read the install instructions, there are always 2 command lines instead of one.
ionic cordova plugin add cordova-plugin-camera
npm install --save #ionic-native/camera
If my memory serves me right, only a single command similar to ionic plugin add somepluginhere will get the job done in the old days.
What are the differences here?
The difference is they are different packages.
ionic cordova plugin add
This command will download the cordova plugin - in this case, camera and set the config.xml , package.json, save in plugins folder and set it for each of your platforms.
Ionic leverages the cordova CLI to do this.
ionic-native
Ionic Native is simply a wrapper to the corresponding plugin.
npm install --save #ionic-native/camera
It installs the package #ionic-native/camera to your node-modules folder and sets that in package.json and nothing more.
This wrapper allows you to inject the corresponding cordova plugin as an Angular provider wherever you need instead of trying to declare the global variable and other workarounds.
I am trying to start an ionic 2 blank project but it always create an ionic 1 project. That's what I do:
npm install -g ionic#beta
ionic start Test --v2
but when I open the project it's still version 1. I have tried to remove ionic completely with:
sudo npm uninstall -g ionic
sudo npm uninstall -g ionic#beta
sudo npm uninstall -g cordova
but after that when I type "ionic" it's showing that I have ionic v1.7.14. (did it several times and there aren't any errors).
for a blank project you can give the following command
ionic start ProjectName blank --v2
for tabs template you can give
ionic start ProjectName tabs --v2
--v2 is for ionic 2 project
you can also include --ts for getting the typescript project
ionic start ProjectName blank --v2 --ts
As of now The --v1 and --v2 flags have been removed.
ionic 1 blank project
ionic start myapp blank --type ionic1
ionic 2 blank project
ionic start myApp blank
ionic 3 blank project
ionic start myapp blank --type ionic-angular
Actually, I found what was wrong. In the documentation it's written:
ionic start Example --v2
where it should be (at least in my case)
ionic start Example -v2
Best tutorial follow the below link
First of install latest Node 6 LTS and NPM 3+ in window machinne.
/>npm install -g ionic#latest
/>ionic start mySampleApp
/>cd ./mySampleApp
/>npm install -g cordova
For android
/>ionic cordova platform add android
For ios
/>ionic cordova platform add ios
/>ionic cordova run android
That’s all if any error or problem comes please comment below.
http://infiniteneed.com/setup-and-start-ionic-mobile-app-from-scratch-in-window-machine/
I believe you will also need ionic#beta - currently 2.0.19
npm install -g ionic#beta
The great thing is, you can still use this CLI to install/control/build Ionic#1.x apps - in fact, there's little difference to the user since Ionic v1 is still the default for ionic#beta.
Ionic 1.2 has been announced:
http://blog.ionic.io/announcing-ionic-1-2/
The source code is availible here:
https://github.com/driftyco/ionic/releases/tag/v1.2.0
But I haven't been able to install with with some shell commands that I have attempted:
$ bower install --save ionic#1.2.0
$ bower install https://github.com/driftyco/ionic/archive/v1.2.0.tar.gz
$ bower install driftyco/ionic-bower#v1.2.0 --force
I can download the source code but don't know how to use it to update my ionic framework
You can install it with bower using:
$ bower install ionic#1.2.0 --force
Anyway, you should take into account that this will only download libraries and source code, but not a CLI tool.
So in my opinion, if you want to test ionic 1.2, you should
Create an ionic project (as usual)
Perform bower install ionic#1.2.0 --force, in order to get the new ionic libs
Replace in your project the content of www/lib/ionic/ with the content of the recently downloaded bower_components/ionic/release/.
DETAIL: Ionic uses to include a .bowerrc file that causes bower packages to be placed in www/lib, instead of inside bower_components, so maybe you'll simply need to replace the content of www/lib/ionic/ with www/lib/ionic/release (--force is need because www/lib/ionic already exists).
Getting below error when running command ionic platform add android
Error: ENOENT, no such file or directory _____\.cordova\lib\android\cordova\3.5.1\VERSION'
I am providing step by step installation of ionic along with cordova.
Have a look it may help you :
First install node to get started using this link
open cmd to install cordova using following command
$ sudo npm install -g cordova
(Drop sudo from the above command if running on Windows)
install ionic using command
$ sudo npm install -g ionic
Create project after selecting directory where project file will be stored,
through CMD,by following command
ionic start {project name} {template type} e.g
ionic start todo blank
Once your project is created go to your newly created project: cd .\new project. for e.g.
D:\Projects>cd.\todo
Now you have to add both android and ios to your project in order to test the build so you need to follow below commands
ionic cordova platform add android
ionic cordova platform add ios
I think in your case you are missing step 5.
I Got this error "unable to grab wrapper project: undefined" in start project ionic, when I tried to create a new project in ionic framework, can anyboby help me ?
This works:
PROXY=http://myproxy.com:8081 ionic start myApp
If you have a username and password
PROXY=http://username:password#myproxy.com:8081 ionic start what
You are having problem with ionic installation.
Go thoroughly through this doc:
Install cordova if you haven't
npm install -g cordova
Install ionic
npm install -g ionic
Notice any permission related issues while installing. Make sure there were no issues (Errors generally has tag ERR)
Good luck!
For anyone else that comes across this issue the following website helped me out - http://www.jasonwatmore.com/post/2014/04/02/Ionic-Framework-Getting-ionic-start-appName-Working-Behind-a-Proxy.aspx
The error was being caused by proxy issues. As it looks like Ionic doesn't pick up the proxy from either node or git. So I followed the instructions (Step 1) on the link and that resolved my initial error.
I also had to additionally install Plugman on top of Cordova:
npm install -g plugman
And then also add the proxy setting to plugman:
plugman config set proxy http://yourproxy.com