Ionic 4 on machine with Ionic 3 projects, what happens?

#1

I have a very important question.

If I update Ionic CLI from 3.2.0 to 4.9.0 what happens with my Ionic 3 projects??
I really don’t want to face “new” problems on my Ionic 3 projects (I already have problems enough).

What would be the difference since I update it?

When I run some ionic command (like ionic serve) I get this message:
The Ionic CLI has an update available (3.20.0 => 4.9.0)! Would you like to install it? (Y/n)

So far I did not feel confident enough to update it, I can not ruin my projects now, every time I update something I get several problems in the projects.

My question is because meanwhile I would like to go trying a bit of Ionic 4 too.

#2

Nothing will happen to your ionic 3 projects, You can still run your ionic 3 projects normally and work with even if you upgrade to ionic 4

2 Likes
#3

May i know how to create ionic 3 project when my ionic version is 4.9.0. When i am trying to execute Ionic start myApp tabs it is creating ionic 4 project.

#4

You might wanna try this

ionic start myApp tabs --type ionic3

1 Like
Ionic 4 option selection?
#5

Doesn’t work. It should be
ionic start myApp tabs --type ionic3

2 Likes
#6

it was a typo which i didnt check before submitting

#7

Thanks for the response but Its ionic start myApp tabs --type=ionic-angular

#8

I did update but it still asks the same question to update, as I had changed the node_modules location it seems to update on that new location and Ionic looks in the old location.

% npm -g install ionic@latest                                                                                                                                               !51
/Users/francisco/.npm-packages/bin/ionic -> /Users/francisco/.npm-packages/lib/node_modules/ionic/bin/ionic
+ ionic@4.9.0
updated 1 package in 15.919s

But in Ionic Info shows in the old location of node_modules:

% ionic info                                                                                                                                                                !52

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.2.2
    Cordova Platforms  : android 6.3.0 ios 4.5.5
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 2.0.0
    ios-sim           : 6.0.0
    Node              : v8.11.3
    npm               : 5.6.0
    OS                : macOS
    Xcode             : Xcode 10.1 Build version 10B61

Environment Variables:

    ANDROID_HOME : /Users/francisco/Library/Android/sdk

How could I solve this?

#9

Seems you messed up your node installation. Just uninstall node and reinstall it, best using a tool like nvm that can manage multiple node installations. Then reinstall Ionic CLI and you should be good.