mirror of
https://github.com/pnpm/pnpm.git
synced 2025-12-23 23:29:17 -05:00
fix: add better peer dep error hints (#4875)
ref https://stackoverflow.com/q/72468635/537682
This commit is contained in:
6
.changeset/young-cougars-obey.md
Normal file
6
.changeset/young-cougars-obey.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/default-reporter": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Add better hints to the peer dependency issue errors.
|
||||
@@ -400,9 +400,9 @@ function reportPeerDependencyIssuesError (
|
||||
const hasMissingPeers = getHasMissingPeers(msg.issuesByProjects)
|
||||
const hints: string[] = []
|
||||
if (hasMissingPeers) {
|
||||
hints.push('If you want peer dependencies to be automatically installed, set the "auto-install-peers" setting to "true".')
|
||||
hints.push('If you want peer dependencies to be automatically installed, add "auto-install-peers=true" to an .npmrc file at the root of your project.')
|
||||
}
|
||||
hints.push('If you don\'t want pnpm to fail on peer dependency issues, set the "strict-peer-dependencies" setting to "false".')
|
||||
hints.push('If you don\'t want pnpm to fail on peer dependency issues, add "strict-peer-dependencies=false" to an .npmrc file at the root of your project.')
|
||||
return {
|
||||
title: err.message,
|
||||
body: `${renderPeerIssues(msg.issuesByProjects)}
|
||||
|
||||
Reference in New Issue
Block a user