Uh, seems the Ionic CLI v3 Release Candidates were successful:
is here: https://github.com/driftyco/ionic-cli
That’s the gist of it:
We have rewritten the CLI from the ground up. Our main focus was to:
- Decrease the amount of time to the first start execution
- Improve the responsiveness of every CLI command
- Make the architecture flexible for future platform support (PWA, electron, etc.)
- Provide better help, more guidance, and more feedback when executing commands.
In doing so we decided to take a new approach to the CLI’s structure. The base CLI installation now ships with global commands that are common to all Ionic apps.
for current Ionic projects are here:
and here for Ionic v1 projects:
Most relevant change is probably this one:
Cordova commands have been namespaced (
ionic cordova) to allow for future platform support and to reduce clutter. Cordova functionality has been moved into a CLI plugin, which is installed by default with new Ionic projects and can be installed in existing Ionic projects with
npm i --save @ionic/cli-plugin-cordova.
New official CLI documentation
lives here http://ionicframework.com/docs/cli/ and is so much better than the old one.
My testing of the last few RCs was great, so I will upgrade soon. Not much that can go wrong now, and just the speedup is worth it.
What is your experience?
When I update
npm install -g ionic@latest, I still see Ionic CLI Version 2.2.2 when I run
ionic info or
Am I missing something?
Hmm, worked for me just now:
PS C:\Users\Jan\Documents> ionic -v
PS C:\Users\Jan\Documents> npm install -g ionic@latest
C:\Program Files\nodejs\ionic -> C:\Program Files\nodejs\node_modules\ionic\bin\ionic
PS C:\Users\Jan\Documents> ionic -v
PS C:\Users\Jan\Documents> ionic info
[WARN] You are not in an Ionic project directory. Project context may be missing.
@ionic/cli-utils : 1.0.0
Ionic CLI : 3.0.0
Node : v6.10.3
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
Maybe some kind of npm cache issue? This is really, really hot off the presses
Thanks for looking into it for me, @Sujan12.
If anyone else has trouble upgrading, it took this SO article for me.
i have tried beta version. It was awesome but i moved back to cli 2.2.3 due to some issues with beta versions. Still one issue with CLI 3 is that it will not generate pages for ionic version 2 projects
There is no such thing as an “ionic version 2 project”.
how can define this problem specific to my old projects ? ya i know but i find only this way to report my issue
(a) I’m not a huge fan of the generators anyway, and recommend that people just pretend they don’t exist.
(b) If you have problems with unsupported old versions of things, which version 2.x of the framework is at this point, the first question you should ask yourself, and the first question anybody else is going to ask you, is “does the problem persist in the latest supported release version?”. I’ve never used the v3 CLI, so I can’t speak to what issues it does have, but “not supporting unsupported stuff” isn’t a valid one.
cool, thx for the news!
P.S.: for an existing project, the ionic blog tell to uninstall ionic first but the ionic-cli doesn’t…I guess it’s better to uninstall it first. I did, it worked…
What were the exact commands you used?
npm uninstall -g ionic
npm install -g ionic@latest
npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest @ionic/cli-plugin-cordova@latest
Note: Actually for my global lib, not for these of my project, I added sudo at the begin of the commands too…but this depends of your config
Thank you very much @reedrichards!
DO NOT USE SUDO!
There is absolutely no reason to run npm with escalated privileges. It is dangerous and opens you up to all sorts of security problems, along with making it nigh impossible to clean up if there are problems. If on unix, install nvm. If on Windows, install nvm-windows.
What should an OSX user do if they are getting a npm error in terminal saying ‘Please try running this command again as root/Administrator.’
Note: I am logged in to my admin account.
sudo in front of the command. Which command is causing this?
I’m getting this during the npm uninstall -g ionic command, but rapropos just said not to use sudo due to security problems so I was hesitant to run it again as a super user…
He is not wrong. But because of the way you installed your node+npm I think you will have to keep using it. Maybe also uninstall
node and reinstall it via
nvm- it’s awesome.
OK Thanks for the quick help!