From ea4c98ae84f20d410126707a1defc58a33998e8b Mon Sep 17 00:00:00 2001 From: chlorine Date: Sun, 4 Sep 2022 12:33:55 +0800 Subject: [PATCH] fix: pnpm v7 install error (#7265) --- 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, {