fix: pnpm v7 install error (#7265)

This commit is contained in:
chlorine
2022-09-04 12:33:55 +08:00
committed by GitHub
parent e63681735f
commit ea4c98ae84
+2 -1
View File
@@ -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, {