Compare commits

...

5 Commits

Author SHA1 Message Date
Vidit Bhavsar 6bbbd915e6
Merge 6143754b13 into 9df5720ab3 2026-01-30 16:30:21 -06:00
Brian Madison 9df5720ab3 readme instructions to installer older v4 if necessary 2026-01-30 14:28:49 -08:00
Murat K Ozcan 1c13305f9f
Merge pull request #1476 from jheyworth/fix/installer-peer-deps-comprehensive
fix: resolve npm install peer dependency issues
2026-01-30 12:05:34 -06:00
jheyworth 6198add5bd fix: resolve npm install peer dependency issues
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>
2026-01-30 15:37:42 +00:00
ViditBee 6143754b13 Fixed: https://github.com/bmad-code-org/BMAD-METHOD/issues/929 2026-01-28 23:57:11 +05:30
6 changed files with 687 additions and 700 deletions

6
.npmrc
View File

@ -1 +1,5 @@
registry=https://registry.npmjs.org # Prevent peer dependency warnings during installation
legacy-peer-deps=true
# Improve install performance
prefer-offline=true

View File

@ -66,7 +66,7 @@ Every step tells you what's next. Optional phases (brainstorming, research, UX d
BMad Method extends with official modules for specialized domains. Modules are available during installation and can be added to your project at any time. After the V6 beta period these will also be available as Plugins and Granular Skills. BMad Method extends with official modules for specialized domains. Modules are available during installation and can be added to your project at any time. After the V6 beta period these will also be available as Plugins and Granular Skills.
| Module | GitHub | NPM | Purpose | | Module | GitHub | NPM | Purpose |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- | | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **BMad Method (BMM)** | [bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) | [bmad-method](https://www.npmjs.com/package/bmad-method) | Core framework with 34+ workflows across 4 development phases | | **BMad Method (BMM)** | [bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) | [bmad-method](https://www.npmjs.com/package/bmad-method) | Core framework with 34+ workflows across 4 development phases |
| **BMad Builder (BMB)** | [bmad-code-org/bmad-builder](https://github.com/bmad-code-org/bmad-builder) | [bmad-builder](https://www.npmjs.com/package/bmad-builder) | Create custom BMad agents, workflows, and domain-specific modules | | **BMad Builder (BMB)** | [bmad-code-org/bmad-builder](https://github.com/bmad-code-org/bmad-builder) | [bmad-builder](https://www.npmjs.com/package/bmad-builder) | Create custom BMad agents, workflows, and domain-specific modules |
| **Test Architect (TEA)** 🆕 | [bmad-code-org/tea](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise) | [tea](https://www.npmjs.com/package/bmad-method-test-architecture-enterprise) | Risk-based test strategy, automation, and release gates (8 workflows) | | **Test Architect (TEA)** 🆕 | [bmad-code-org/tea](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise) | [tea](https://www.npmjs.com/package/bmad-method-test-architecture-enterprise) | Risk-based test strategy, automation, and release gates (8 workflows) |
@ -116,6 +116,7 @@ BMad provides two testing options to fit your needs:
### For v4 Users ### For v4 Users
- **[v4 Documentation](https://github.com/bmad-code-org/BMAD-METHOD/tree/V4/docs)** - **[v4 Documentation](https://github.com/bmad-code-org/BMAD-METHOD/tree/V4/docs)**
- If you need to install V4, you can do this with `npx bmad-method@4.44.3 install` - similar for any past version.
## Community ## Community

1311
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -88,7 +88,7 @@
}, },
"devDependencies": { "devDependencies": {
"@astrojs/sitemap": "^3.6.0", "@astrojs/sitemap": "^3.6.0",
"@astrojs/starlight": "^0.37.0", "@astrojs/starlight": "^0.37.5",
"@eslint/js": "^9.33.0", "@eslint/js": "^9.33.0",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"astro": "^5.16.0", "astro": "^5.16.0",
@ -99,7 +99,7 @@
"eslint-plugin-unicorn": "^60.0.0", "eslint-plugin-unicorn": "^60.0.0",
"eslint-plugin-yml": "^1.18.0", "eslint-plugin-yml": "^1.18.0",
"husky": "^9.1.7", "husky": "^9.1.7",
"jest": "^30.0.4", "jest": "^30.2.0",
"lint-staged": "^16.1.1", "lint-staged": "^16.1.1",
"markdownlint-cli2": "^0.19.1", "markdownlint-cli2": "^0.19.1",
"prettier": "^3.7.4", "prettier": "^3.7.4",

View File

@ -1,4 +1,5 @@
const path = require('node:path'); const path = require('node:path');
const YAML = require('yaml');
const { BaseIdeSetup } = require('./_base-ide'); const { BaseIdeSetup } = require('./_base-ide');
const chalk = require('chalk'); const chalk = require('chalk');
const { AgentCommandGenerator } = require('./shared/agent-command-generator'); const { AgentCommandGenerator } = require('./shared/agent-command-generator');
@ -92,43 +93,31 @@ class KiloSetup extends BaseIdeSetup {
* Create a mode entry for an agent * Create a mode entry for an agent
*/ */
async createModeEntry(artifact, projectDir) { async createModeEntry(artifact, projectDir) {
// Extract metadata from launcher content const title = artifact.content.match(/title="([^"]+)"/)?.[1] ?? this.formatTitle(artifact.name);
const titleMatch = artifact.content.match(/title="([^"]+)"/);
const title = titleMatch ? titleMatch[1] : this.formatTitle(artifact.name);
const iconMatch = artifact.content.match(/icon="([^"]+)"/); const icon = artifact.content.match(/icon="([^"]+)"/)?.[1] ?? '🤖';
const icon = iconMatch ? iconMatch[1] : '🤖';
const whenToUseMatch = artifact.content.match(/whenToUse="([^"]+)"/); const whenToUse = artifact.content.match(/whenToUse="([^"]+)"/)?.[1] ?? `Use for ${title} tasks`;
const whenToUse = whenToUseMatch ? whenToUseMatch[1] : `Use for ${title} tasks`;
const roleDefinition =
artifact.content.match(/roleDefinition="([^"]+)"/)?.[1] ?? `You are a ${title} specializing in ${title.toLowerCase()} tasks.`;
// Get the activation header from central template
const activationHeader = await this.getAgentCommandHeader(); const activationHeader = await this.getAgentCommandHeader();
const roleDefinitionMatch = artifact.content.match(/roleDefinition="([^"]+)"/);
const roleDefinition = roleDefinitionMatch
? roleDefinitionMatch[1]
: `You are a ${title} specializing in ${title.toLowerCase()} tasks.`;
// Get relative path
const relativePath = path.relative(projectDir, artifact.sourcePath).replaceAll('\\', '/'); const relativePath = path.relative(projectDir, artifact.sourcePath).replaceAll('\\', '/');
// Build mode entry (KiloCode uses same schema as Roo) const entry = {
const slug = `bmad-${artifact.module}-${artifact.name}`; slug: `bmad-${artifact.module}-${artifact.name}`,
let modeEntry = ` - slug: ${slug}\n`; name: `${icon} ${title}`,
modeEntry += ` name: '${icon} ${title}'\n`; roleDefinition,
modeEntry += ` roleDefinition: ${roleDefinition}\n`; whenToUse,
modeEntry += ` whenToUse: ${whenToUse}\n`; customInstructions:
modeEntry += ` customInstructions: |\n`; `${activationHeader}` +
modeEntry += ` ${activationHeader} Read the full YAML from ${relativePath} start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode\n`; `Read the full YAML from ${relativePath} start activation to alter your state of being follow startup section instructions stay in this being until told to exit this mode`,
modeEntry += ` groups:\n`; groups: ['read', 'edit', 'browser', 'command', 'mcp'],
modeEntry += ` - read\n`; };
modeEntry += ` - edit\n`;
modeEntry += ` - browser\n`;
modeEntry += ` - command\n`;
modeEntry += ` - mcp\n`;
return modeEntry; return YAML.stringify([entry], { indent: 2 });
} }
/** /**

View File

@ -416,7 +416,7 @@ class ModuleManager {
if (needsDependencyInstall || wasNewClone || nodeModulesMissing) { if (needsDependencyInstall || wasNewClone || nodeModulesMissing) {
const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start(); const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start();
try { try {
execSync('npm install --production --no-audit --no-fund --prefer-offline --no-progress', { execSync('npm install --production --no-audit --no-fund --prefer-offline --no-progress --legacy-peer-deps', {
cwd: moduleCacheDir, cwd: moduleCacheDir,
stdio: 'pipe', stdio: 'pipe',
timeout: 120_000, // 2 minute timeout timeout: 120_000, // 2 minute timeout
@ -441,7 +441,7 @@ class ModuleManager {
if (packageJsonNewer) { if (packageJsonNewer) {
const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start(); const installSpinner = ora(`Installing dependencies for ${moduleInfo.name}...`).start();
try { try {
execSync('npm install --production --no-audit --no-fund --prefer-offline --no-progress', { execSync('npm install --production --no-audit --no-fund --prefer-offline --no-progress --legacy-peer-deps', {
cwd: moduleCacheDir, cwd: moduleCacheDir,
stdio: 'pipe', stdio: 'pipe',
timeout: 120_000, // 2 minute timeout timeout: 120_000, // 2 minute timeout