fix: resolve npm install peer dependency issues#1476
Conversation
Comprehensive fix for installer failures related to Astro/Starlight peer dependencies: 1. Update @astrojs/starlight from 0.37.0 to 0.37.5 (latest stable) 2. Add .npmrc with legacy-peer-deps to prevent peer dependency warnings 3. Update module installer to use --legacy-peer-deps flag for external modules This resolves issues where: - npm shows peer dependency warnings that users interpret as failures - External module installations fail due to strict peer dependency checking - Different npm versions handle peer dependencies inconsistently Technical note: Starlight 0.37.x requires astro@^5.5.0, which is compatible with astro@5.16.0 (^5.5.0 means >=5.5.0 <6.0.0). The issue was npm's warning display, not actual incompatibility. Fixes: Installation errors reported in v6.0.0-Beta.2 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughConfiguration and dependency updates to improve npm installation reliability. Changes include adding peer dependency handling and offline installation preferences to npm config, plus updating a starlight dependency version and adding installation flags to CLI commands. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
alexeyv
left a comment
There was a problem hiding this comment.
Looks good to me. Wish I knew about --legacy-peer-deps two weeks ago :)
### 🎁 Features * Add generate-project-context workflow * Shard market research customer analysis ### 🐛 Bug Fixes * Fix npm install peer dependency issues (PR #1476) * Fix leaked source paths in PRD validation report (#1481) * Fix orphaned market research customer analysis (#1486) * Fix duplicate 2-letter brainstorming code (BS → BSP) * Fix tech writer sidecar functionality (#1487) * Fix relative paths in workflow steps (#1497, #1498) * Fix party-mode workflow file extension (#1499) * Fix generated slash commands (#1501) * Fix agent scan and help CSV files * Fix HELP_STEP placeholder replacement (#1437) ### 📚 Documentation * Add exact slash commands to Getting Started guide (#1505) * Remove .claude/commands from version control (#1506) ### 🔧 Maintenance * Update Starlight to 0.37.5 * Add GitHub issue templates
### 🎁 Features * Add generate-project-context workflow * Shard market research customer analysis ### 🐛 Bug Fixes * Fix npm install peer dependency issues (PR bmad-code-org#1476) * Fix leaked source paths in PRD validation report (bmad-code-org#1481) * Fix orphaned market research customer analysis (bmad-code-org#1486) * Fix duplicate 2-letter brainstorming code (BS → BSP) * Fix tech writer sidecar functionality (bmad-code-org#1487) * Fix relative paths in workflow steps (bmad-code-org#1497, bmad-code-org#1498) * Fix party-mode workflow file extension (bmad-code-org#1499) * Fix generated slash commands (bmad-code-org#1501) * Fix agent scan and help CSV files * Fix HELP_STEP placeholder replacement (bmad-code-org#1437) ### 📚 Documentation * Add exact slash commands to Getting Started guide (bmad-code-org#1505) * Remove .claude/commands from version control (bmad-code-org#1506) ### 🔧 Maintenance * Update Starlight to 0.37.5 * Add GitHub issue templates
Summary
Comprehensive fix for installer failures related to Astro/Starlight peer dependencies reported in v6.0.0-Beta.2.
Problem
Users experienced npm install failures with the error:
Investigation
After thorough testing, I found:
Solution
This PR implements a three-pronged fix:
1. Update Starlight to Latest (0.37.5)
2. Add .npmrc Configuration
3. Update Module Installer
--legacy-peer-depsflag to npm install commands in module managertools/cli/installers/lib/modules/manager.js(lines 419, 444)Testing
Impact
Files Changed
package.json- Updated Starlight to 0.37.5.npmrc- New file with legacy-peer-deps configurationtools/cli/installers/lib/modules/manager.js- Added --legacy-peer-deps to npm install commandspackage-lock.json- Regenerated with new Starlight version🤖 Generated with Claude Code