Skip to content

Commit

Permalink
fix: pnpm v7 install error (#7265)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvqq authored Sep 4, 2022
1 parent e636817 commit ea4c98a
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

1 comment on commit ea4c98a

@dafavio
Copy link

@dafavio dafavio commented on ea4c98a Oct 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

อัพเดท

Please sign in to comment.