Skip to content

Commit

Permalink
fix: pnpm v7 install error
Browse files Browse the repository at this point in the history
  • Loading branch information
lvqq committed Aug 26, 2022
1 parent e636817 commit c116d32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/@vue/cli/lib/Creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit c116d32

Please sign in to comment.