ionic-team / ionic-team/ionic-cli

Allow configuring npmClient on a project level

Đang mở
#5,113 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Currently, the npmClient ionic uses can only be set globally, using e.g.:
```sh
ionic config set -g npmClient pnpm
```

In my opinion, it should be possible to override this on a project level, e.g.:
```sh
ionic config set npmClient pnpm
```
This commands "succeeds" and updates the `ionic.config.json`, but ionic doesn't check that file for this parameter (a bit confusing).

The use cases:
- We have some older projects that use npm, and newer once use pnpm. It has happened multiple times that I run `ionic build` when i just switched project and forgot to switch package manager. This then creates a `pnpm-lock` file in an `npm` project. And regularly breaks my dependencies and requires deleting `node-modules` and reinstalling. This wastes time.
- We have pipelines that build iOS projects on local MacMini's. However, if the global ionic package manager changes, and a pipeline doesn't have the setting to change it back, the build breaks. It's not always obvious that the issue is caused by a switch in package manager.

This was previously suggested in https://github.com/ionic-team/ionic-cli/issues/4570, but was not implemented because the lack of use cases.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.