[SOLVED] No local CLI detected. Starting with CLI 3.6, the CLI must be installed locally to use local CLI plugins

I upgraded to Ionic 3.6.0 like described in the Changelog, respectively

npm install -g ionic@latest
npm install @ionic/app-scripts@latest --save-dev
npm install ionic-angular@latest --save

Afterwards, I started the command ionic server and following question poped up

[WARN] No local CLI detected.
Starting with CLI 3.6, the CLI must be installed locally to use local CLI plugins.
? Install now?

If I answer yes, following command is then run

npm install --save-dev --save-exact ionic@latest

But why? Do I then now need Ionic generally (-g) installed and one local copy of Ionic in each project I have? Really is that mandatory? Where is that documented?

P.S.: If I answer no to the question, I am not be able to start my server ionic serve anymore. Each time the question pop up, answer no => the process stop

I found something about it in the Ionic-cli changeling

Added recommendation for local CLI installation. You can use the global ionic binary from npm i -g ionic installation and it will use the local CLI version if installed, similar to gulp or other CLIs. The CLI is installed locally for new projects by default.

But actually it seems it isn’t a recommendation since I can’t start my server without having a local ionic installed…I gonna open an issue

I opened following issue:

1 Like

I think this is actually a good thing. Now every project has a record of what CLI worked with it. We will be very happy about that in 6 months or a year. Also if you have a project that doesn’t work with the newest CLI for whatever reason (thank god that never happened to me before), it will now be possible to keep the old CLI just for this project. The overhead is minimal I think, we already have a bunch of CLI plugins installed locally.

1 Like

Thx for this feedback, furthermore the explanation in my issue, I now understand the why.

But still, the changelogs should be improved and not displaying that this as optional since it’s mandatory

Fair enough, that’s a valid point that will be taken care via your issue I think.

1 Like

CHANGELOG was updated, from now on, having Ionic CLI as local --save-dev dependency is a must

1 Like