ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Encourage local installation of @ionic/cli package

Open aeruhxi opened this issue 4 years ago • 1 comments

Problem Statement

Currently, the installation docs recommends global installation of the cli. This can be annoying when you have to maintain different projects with different ionic framework versions (for example ionic framework 3 and 4) because one cli does not work with the other version of the framework.

Suggested changes

It's been a while since npm has introduced npx. I don't see any good reason to install cli globally anymore. So I would like to propose a change in the documentation to recommend the local installation of cli.

But because of how cli works currently, it requires native-run to be installed globally. So if it's possible, I would also like to propose to change this behavior of cli to work with native-run installed locally.

Another advantage of installing cli locally is making the initial setup of the project in a new machine much easier. With this, npm install should take care of everything ideally.

aeruhxi avatar Dec 14 '20 08:12 aeruhxi

In my specific case: In our CI/CD system when we prepare the environment we have to add this additional global installment. It would be easier in the configuration to have everything prepared within the package.json.

Also @capacitor/cli and @angular/cli can also be found in the dev-dependencies :)

de-dan avatar Nov 18 '23 13:11 de-dan