Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global CLI Required #4422

Open
Lindsor opened this issue May 5, 2020 · 2 comments
Open

Global CLI Required #4422

Lindsor opened this issue May 5, 2020 · 2 comments
Labels

Comments

@Lindsor
Copy link

Lindsor commented May 5, 2020

Currently Ionic requires a bunch of things to be installed globally.
This pattern seems to be very error prone and counter productive.

I run a consultancy company that deals with multiple applications at once running different versions of Ionic (3, 4, 5).
Depending on the version of the CLI you need different dependencies (cordova-res, native-run, cordova, ...).

Ionic should install these dependencies locally so developers can use npx <command> without requiring ANY globally installed packages.

This already currently works to a certain degree, i have an Ionic 3 and 4 project that have everything installed locally and work fine.

This should be the accepted pattern going forward though in order to make this framework more future proof and less frustrating for devs needing to support multiple applications running multiple versions.

@ionitron-bot ionitron-bot bot added the triage label May 5, 2020
@imhoffd
Copy link
Contributor

imhoffd commented May 5, 2020

I don't think we require a global installation of anything. You should be able to install @ionic/cli, cordova-res, native-run, and even cordova locally and then use npx ionic <command>.

The global install is nice for beginners and currently the easiest way to start an app, though we do want to implement npm init ionic (see #3300).

@Lindsor
Copy link
Author

Lindsor commented May 5, 2020

Hey @dwieeb sorry your correct none of it is technically required its just not clear from your docs and from CLI messaged.

What I'm proposing is that this becomes the default behavior both in documentation and in the CLI project generator.
When adding --cordova then cordova and cordova-res should be added to package.json
And the CLI should be added to the package.json by default as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants