Cannot create Ionic 2 Typescript project


#1

Some settings appear to have got confused when I upgraded Visual Studio’s Cordova tools earlier. If I type:

ionic start ProjectName --v2 --ts

It creates an Ionic V1 project without the Typescript goodness.

Have the command line options been changed, or has my installation been screwed up somehow?

Thanks.


#2

On a related note, if I try to create the Tutorial app with:

ionic start MyIonic2Project tutorial --v2

I’m getting an error message:

Not found: https://github.com/driftyco/ionic-starter-tutorial/archive/master.zip (404)
Please verify the url and try again.

I suspect that something got a bit mixed up in the configuration files.


#3

You need to specify you want a blank project:

ionic start ProjectName blank --v2 --ts

#4

I’ve tried that. For some reason my setup isn’t generating a V2 project, and I’m getting the V1 framework instead.

If I run the call with the --verbose flag it says that V2 and TypeScript are enabled, but the tool isn’t generating the right framework.

There was a status update earlier that about a service provider related problem, and I’m wondering if that might have been what was causing my issue. I’ll try again tomorrow morning.


#5

It works just fine for me.

I’ve generated another blank project before posting just to be sure everything is ok.

Are you sure you have a correct Ionic CLI. You need to install Ionic 2 compatible CLI:

npm install -g cordova ionic@beta

and when you try ionic -v you should receive:

2.0.0-beta.17

#6

That seems to have fixed it, thanks. :smile:

V2 was working fine, and then I did an update to Visual Studio, and it must have downgraded Cordova to the non-Beta version.

Thanks!


#7

Np, I’m glad to be of help :slight_smile:


#8

I used below command lines for getting ionic V2

npm install -g cordova ionic@beta
ionic start myApp tutorial --v2

ionic Version is
2.0.0-beta.17

I landed up in below errors

E:\practice>ionic start myAApp tutorial–v2

One awesome Ionic app coming right up…

Creating Ionic app in folder E:\practice\myAApp based on
tutorial–v2 project
Downloading: https://github.com/driftyco/ionic-app-base/a
rchive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic-starter-tu
torial–v2/archive/master.zip
? Not found: https://github.com/driftyco/ionic-starter-t
utorial–v2/archive/master.zip (404)
? Please verify the url and try again.
Please verify you are using a valid URL or a valid ionic
starter.
View available starter templates: ionic templates
More info available at:
http://ionicframework.com/getting-started/
https://github.com/driftyco/ionic-cli

Please suggest on this


#9

Probably a typo but put a space between tutorial and --v2 like this ionic start myAApp tutorial --v2.