Switching Ionic CLI between 1.x and 2.x back and forth

I downloaded ionic 2 and i am able to create apps with it just fine.

i do that by following command

   ionic start cutePuppyPics1 --v2

However i still want to create 1.x apps how can i do that without removing ionic globally and making global changes?

something like

 ionic start cutePuppyPics1 --v1

that installs ionic 1.x

Thanks

So, when you are running…

ionic start cutePuppyPics1 --v2

…the --v2 part is an optional parameter. If you don’t include it, the CLI will assume you mean V1. So,

ionic start cutePuppyPics1

… should give you a version 1 app.

Yep, the v2 cli maintains backwards compatibility with v1 projects.

DId not work for me.

Trying to create ionic1 apps with ionic2 CLI, i did the following,

ionic start cutePuppyPics1

and i get this:–>

 One awesome Ionic app coming right up...

Creating Ionic app in folder C:\wamp\www\IONIC 2\cutePuppyPics1 based on tabs pr
oject
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
[=============================]  100%  0.0s

Adding initial native plugins
[=============================]  100%  0.0s
{ [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "ionic plugin add co
rdova-plugin-device && ionic plugin add cordova-plugin-console && ionic plugin a
dd cordova-plugin-whitelist && ionic plugin add cordova-plugin-splashscreen && i
onic plugin add cordova-plugin-statusbar && ionic plugin add cordova-plugin-stat
usbar && ionic plugin add ionic-plugin-keyboard"

Couldn't find ionic.project file. Are you in an Ionic project? (CLI v2.0.0-beta.15)

]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\Windows\\system32\\cmd.exe /s /c "ionic plugin add cordova-plugin-de
vice && ionic plugin add cordova-plugin-console && ionic plugin add cordova-plug
in-whitelist && ionic plugin add cordova-plugin-splashscreen && ionic plugin add
 cordova-plugin-statusbar && ionic plugin add cordova-plugin-statusbar && ionic
plugin add ionic-plugin-keyboard"' } '\n\u001b[1m\u001b[31mCouldn\'t find ionic.
project file. Are you in an Ionic project?\u001b[39m\u001b[22m\u001b[1m\u001b[31
m (CLI v2.0.0-beta.15)\u001b[39m\u001b[22m\n\n'

Unable to add plugins. Perhaps your version of Cordova is too old. Try updating
(npm install -g cordova), removing this project folder, and trying again: (CLI v
2.0.0-beta.15)

Your system information:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.0
Gulp local:
Ionic Version: 1.2.1
Ionic CLI Version: 2.0.0-beta.15
Ionic App Lib Version: 2.0.0-beta.8
OS: Windows 7
Node Version: v5.3.0

Getting

Couldn’t find ionic.project file. Are you in an Ionic project? (CLI v2.0.0-beta.15)

In the folder that gets created i see no plugins folder and ionic.project file

the same happens with
ionic start cutePuppyPics1 --v1 command

can you let me know??

this was solved…i removed and installed node and ionic and that solved it

when i install the blank app from v1… i am get this error

image

yes i got the same message…i updated all the CLI’s i had and also cleared node cache still i got the same problem so i did the following

uninstalled node
deleted node and npm folders from my harddrive
then downloaded and installed node and ionic & cordova again

Now its working fine for me

oh…i use different way again i just type npm install -g ionic so back to my older version…now working and create new project for older version. thanks…

Getting the same problem here. Will try to update ionic@beta and node then see what happens.

is there a real answer other then uninstalling everything ( node/ionic ) and then reinstalling…

Hi,
I am using Ionic 1.7 version and implemented push notification using ionic-platform-web-client.

I have read today that ionic-platform-web-client is now deprecated and i can migrate to Ionic Cloud for Push notification.

But this page mention i have to update the CLI version to 2.0 as mentioned below

This is a migration guide for existing Ionic 1 apps to migrate from the deprecated ionic-platform-web-client to the Cloud Client.

Before anything, make sure you’re using the latest CLI (2.x) npm update --save ionic.

Does that mean i can use Ionic Cloud only with Ionic 2.x and not with 1.x ?

I do not want to work with Ionic 2 for a moment. Please suggest

Thanks
Rohit Gupta

It still create a V2 ionic project

How this works is highly dependent on the CLI version. <2.2.3 defaults to v1 and accepts the --v2 switch. >=2.2.3 defaults to v2 and accepts the --v1 switch.

1 Like

In this post, there’s no real final answer.

No final answer to what?

1 Like

Downloaded ionic and npm today, and I tried to use it with an existent ionic v1 project. None of the queries I made to the command line are working, apparently a lot of things have changed after 4 months of away. Here again I am questioning my either ionic is still supported by the community :\

I was trying to revive an Ionic 1 project using Ionic CLI 3, but a lot of things are broken and spent a couple of days trying to make it work. To cut the story short, don’t upgrade to Ionic CLI 3 if you still need to work on older versions.

My new projects started on Ionic 3 are doing fine though.

IonicV1 project works on ionic CLI 3, but only problem I am experiencing is orientation where half of the screen is black on locked landscape orientation.

I don’t understand what motivates people to post things like:

or

Unless you describe specific problems you are having, nobody can offer any meaningful assistance.

1 Like

@rapropos - well, i used Ionic ever since the project started and I love it. my comment is based on my experience. my motivation is my frustration. unfortunately, i don’t have the time to explain to you all the time i lost.

as for the assistance, i already mentioned the solution i came up with.