Install production version of ionic 4 - I do not want ionic 5

I see they have updated to ionic 5. I want to use ionic 4 how can I install this on my new PC.

 npm install -g ionic

installs version 5

@brandyshea, @mhartington: This is an absolutely never-ending source of confusion here. Can you please issue some official advice about what terminology we should be using? I have been doing my best for years to get people to stop using “Ionic 3” and “Ionic 4”, but apparently have not made a dent at all.

@Mothbeard: “Ionic” isn’t a monolithic thing. The CLI (the thing that builds your app) and the framework (the thing that gets embedded in your app) run on parallel version tracks that aren’t related. CLI 5 has been released for a while, and is safe to use to build production apps of framework 3, 4, and 5 (which is still pre-release). So the bottom line is “don’t worry about it”, and if you don’t believe me, start a new project and look at its package.json for the @ionic/angular version therein.

While there is already an effort made by having it installed as @ionic/cli I suggest to rename the cli command to ‘clionic’

And issue an award for every 10th person asking the question without bothering to search the answer on the forum

:crazy_face::crazy_face::crazy_face::crazy_face:

Good news - we actually released Ionic CLI 6.0.0 under the npm tag @ionic/cli within the last week. This has been a long time coming and it took some convincing internally to get a more descriptive package name, but I think this will help in the future! We tweeted about this earlier: https://twitter.com/Ionicframework/status/1223268498362851330?s=20

The documentation on the site has been updated to reflect this: https://ionicframework.com/docs/installation/cli

The older package will live on since there are so many tutorials out there that use the ionic package, but this is a step in the right direction.

As for how to respond to any package confusion, I wrote up a response awhile back that may be helpful to link to:

Usually when we see incorrect packages being referenced we’ll recommend running ionic info from within the project as that gives the best overview of the different packages & their versions. Hopefully that helps. :slightly_smiling_face:

2 Likes