Azure / Azure/vscode-aks-tools
Revisit `--legacy-peer-deps` in our package.json aka Remove `--legacy-peer-deps` from npm install
- Dominant language
- TypeScript
- Stars
- 65
- Forks
- 78
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 22
Description
### Why this change?
* **Avoids bypassing peer dependency validation**
The `--legacy-peer-deps` flag ignores peer dependency conflicts, which can hide real compatibility issues between packages.
* **Improves dependency correctness**
By allowing npm to enforce peer dependency rules (as intended in npm v7+), we ensure that all installed packages are compatible with each other.
* **Prevents hidden runtime issues**
Ignoring peer dependencies can lead to subtle bugs at runtime that are harder to debug later.
* **Aligns with modern npm best practices**
The flag is meant as a temporary workaround and not recommended for long-term use.
## 📌 Work Item: Remove legacy peer deps workaround
Remove `--legacy-peer-deps` and fix dependency tree properly
### Description
Currently, the project uses `--legacy-peer-deps` during `npm install`, which bypasses peer dependency validation.
This creates a risk of:
* Installing incompatible package versions
* Masking underlying dependency issues
* Introducing runtime instability
### Goals
* Remove reliance on `--legacy-peer-deps`
* Ensure a clean and valid dependency tree
* Align all peer dependencies correctly
Contributor guide
Assessment
This issue has not been assessed yet.