We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
legacy-peer-deps
1 parent a263da5 commit b8d593aCopy full SHA for b8d593a
packages/@vue/cli/lib/util/ProjectPackageManager.js
@@ -134,6 +134,10 @@ class PackageManager {
134
135
this.needsNpmInstallFix = true
136
}
137
+
138
+ if (semver.gte(npmVersion, '7.0.0')) {
139
+ this.needsPeerDepsFix = true
140
+ }
141
142
143
if (!SUPPORTED_PACKAGE_MANAGERS.includes(this.bin)) {
@@ -374,7 +378,7 @@ class PackageManager {
374
378
return
375
379
376
380
377
- return await this.runCommand('install')
381
+ return await this.runCommand('install', this.needsPeerDepsFix ? ['--legacy-peer-deps'] : [])
382
383
384
async add (packageName, {
@@ -390,6 +394,10 @@ class PackageManager {
390
394
391
395
392
396
397
+ if (this.needsPeerDepsFix) {
398
+ args.push('--legacy-peer-deps')
399
400
393
401
return await this.runCommand('add', [packageName, ...args])
402
403
0 commit comments