Skip to content

Commit

Permalink
Changed package manager for install-native.mjs to pnpm (#52971)
Browse files Browse the repository at this point in the history
fixes #52970

Yarn 3 has removed the "--force" flag. This can cause issues with building the Next.js repository if Yarn 3 is activated on a development machine (specifically the postinstall script "install-native.mjs"). Using pnpm as the package manager fixes this issue.
  • Loading branch information
syedtaqi95 committed Jul 21, 2023
1 parent 3e34b9f commit bb5fced
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/install-native.mjs
Expand Up @@ -56,7 +56,9 @@ import fs from 'fs-extra'
path.join(tmpdir, 'package.json'),
JSON.stringify(pkgJson)
)
let { stdout } = await execa('yarn', ['--force'], { cwd: tmpdir })
let { stdout } = await execa('pnpm', ['install', '--force'], {
cwd: tmpdir,
})
console.log(stdout)
let pkgs = await fs.readdir(path.join(tmpdir, 'node_modules/@next'))
await fs.ensureDir(path.join(cwd, 'node_modules/@next'))
Expand Down

0 comments on commit bb5fced

Please sign in to comment.