fix: resolve npm peer dependency conflict blocking CI#37
Conversation
Add .npmrc with legacy-peer-deps=true so npm ci resolves peer dependency version mismatches that block CI installation.
There was a problem hiding this comment.
Pull request overview
Unblocks CI by relaxing npm peer dependency resolution so npm ci can install despite the unbuild@3.6.1 ↔ typescript@6 peer dependency conflict.
Changes:
- Add a repo-level
.npmrcenablinglegacy-peer-deps=truefor installs. - (Per PR description) Regenerate
package-lock.jsonusing the relaxed peer dependency resolution.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1 @@ | |||
| legacy-peer-deps=true | |||
There was a problem hiding this comment.
Consider adding an inline comment explaining why legacy-peer-deps is enabled (e.g., unbuild@3.6.1 ↔ TypeScript 6 peer conflict) and when it can be removed. Without context, this setting can be confusing for future maintainers.
| @@ -0,0 +1 @@ | |||
| legacy-peer-deps=true | |||
There was a problem hiding this comment.
Setting legacy-peer-deps=true in a repo-level .npmrc affects all installs (local dev, CI, and any scripts) and can mask new peer dependency issues. Consider scoping this to CI only (e.g., npm ci --legacy-peer-deps or NPM_CONFIG_LEGACY_PEER_DEPS=true in workflows) to keep stricter resolution for developers while still unblocking CI.
| legacy-peer-deps=true |
Summary
npm ciwas failing in all CI jobs due to a peer dependency version conflict:Neither package has released a version that officially supports the other's major version yet.
Fix
Added
.npmrcwithlegacy-peer-deps=trueso npm uses the relaxed peer dependency resolution algorithm, allowing installation to succeed. The lock file has been regenerated with this setting applied.Test plan
npm cisucceeds in CI