From d7baae2bf2a44cd81acc17f3dc159fdbd7a79926 Mon Sep 17 00:00:00 2001 From: lvqq Date: Fri, 26 Aug 2022 19:43:31 +0800 Subject: [PATCH] fix: pnpm v7 install error --- packages/@vue/cli/lib/Creator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@vue/cli/lib/Creator.js b/packages/@vue/cli/lib/Creator.js index 05e1754ecd..d502972517 100644 --- a/packages/@vue/cli/lib/Creator.js +++ b/packages/@vue/cli/lib/Creator.js @@ -167,7 +167,8 @@ module.exports = class Creator extends EventEmitter { // generate a .npmrc file for pnpm, to persist the `shamefully-flatten` flag if (packageManager === 'pnpm') { const pnpmConfig = hasPnpmVersionOrLater('4.0.0') - ? 'shamefully-hoist=true\n' + // pnpm v7 makes breaking change to set strict-peer-dependencies=true by default, which may cause some problems when installing + ? 'shamefully-hoist=true\nstrict-peer-dependencies=false\n' : 'shamefully-flatten=true\n' await writeFileTree(context, {