thedotmack/claude-mem · warning
npm reported an ERESOLVE peer-dependency conflict in…
Error message
npm reported an ERESOLVE peer-dependency conflict in marketplace deps; retrying once with --legacy-peer-deps.
What it means
The installer runs a strict `npm install` in the marketplace directory. When it fails with an ERESOLVE peer-dependency conflict, the installer logs this warning, prints the extracted ERESOLVE block, and retries exactly once with `--legacy-peer-deps` (which skips peer-resolution enforcement).
Solutions
- Let the installer's automatic --legacy-peer-deps retry complete — it usually resolves the conflict.
- Run `npm install --legacy-peer-deps` manually inside the marketplace directory to inspect/fix the tree.
- Update or remove the offending plugin package whose peerDependencies conflict, then rerun the installer.
- Use an npm override in package.json to force a compatible peer version.
Example fix
// before npm install // after npm install --legacy-peer-deps
Defensive patterns
Strategy: retry
Validate before calling
npm ls --all 2>&1 | grep -i 'ERESOLVE\|peer' || echo 'peer deps OK'
Try / catch
try {
runNpmStrict(marketplaceDir, baseFlags);
} catch (e) {
if (String(e.details).includes('ERESOLVE')) {
runNpmStrict(marketplaceDir, [...baseFlags, '--legacy-peer-deps']);
} else { throw e; }
} Prevention
- Pre-install with --legacy-peer-deps when marketplace plugins pin conflicting peer versions.
- Keep plugin packages updated so peerDependency ranges stay compatible.
- Use npm overrides in package.json to pin shared deps to a single compatible version.
When it happens
Trigger: `runNpmStrict(marketplaceDir, baseFlags)` exits non-zero with stderr containing an ERESOLVE block — e.g. marketplace plugin packages demanding incompatible peer versions of a shared dependency.
Common situations: Plugins in the marketplace pinning peerDependencies to older/newer major versions than what's resolvable; npm 7+ strict peer resolution vs packages built for npm 6; mixed versions of claude plugin deps.
Related errors
- ERESOLVE
- npm reported an ERESOLVE peer-dependency conflict in…
- API key prompt cancelled — leaving existing configuration…
- claude-mem: could not read
- Codex marketplace root
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/870a6638f2f1f77d.
Report an issue: GitHub.
Appendix: source
Thrown at src/npx-cli/commands/install.ts:809
component: 'marketplace-npm-install',
phase: 'marketplace-deps',
cause: new Error('npm install timed out'),
details: strictResult.stderr.slice(0, 4000),
}, summary);
}
if (!isEresolve(strictResult.stderr)) {
// A strict failure with no ERESOLVE is a real bug — never retry, ABORT.
installerError(ErrorSeverity.ABORT, {
component: 'marketplace-npm-install',
phase: 'marketplace-deps',
cause: new Error(`npm install failed (exit ${strictResult.code})`),
details: strictResult.stderr.slice(0, 4000),
}, summary);
}
// Confirmed ERESOLVE — log loudly, attempt one fallback with --legacy-peer-deps.
log.warn('npm reported an ERESOLVE peer-dependency conflict in marketplace deps; retrying once with --legacy-peer-deps.');
log.warn(extractEresolveBlock(strictResult.stderr));
const legacyResult = await runNpmStrict(marketplaceDir, [...baseFlags, '--legacy-peer-deps']);
if (legacyResult.code === 0) {
summary.warnings.push({
component: 'marketplace-npm-install',
message: 'tree-sitter peer-dep ERESOLVE was resolved with the --legacy-peer-deps fallback. Benign for the marketplace install; re-evaluate when tree-sitter peer ranges change.',
remediation: 'No action required.',
});
return;
}
installerError(ErrorSeverity.ABORT, {
component: 'marketplace-npm-install',
phase: 'marketplace-deps',
cause: new Error(`npm install --legacy-peer-deps still failed (exit ${legacyResult.code}): ERESOLVE`),
details: legacyResult.stderr.slice(0, 4000),
}, summary);View on GitHub (pinned to d8bc9755e7)