Unverified Commit bb5fced3 authored by Syed Taqi Haider's avatar Syed Taqi Haider Committed by GitHub

Changed package manager for install-native.mjs to pnpm (#52971)



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.
parent 3e34b9f2
...@@ -56,7 +56,9 @@ import fs from 'fs-extra' ...@@ -56,7 +56,9 @@ import fs from 'fs-extra'
path.join(tmpdir, 'package.json'), path.join(tmpdir, 'package.json'),
JSON.stringify(pkgJson) JSON.stringify(pkgJson)
) )
let { stdout } = await execa('yarn', ['--force'], { cwd: tmpdir }) let { stdout } = await execa('pnpm', ['install', '--force'], {
cwd: tmpdir,
})
console.log(stdout) console.log(stdout)
let pkgs = await fs.readdir(path.join(tmpdir, 'node_modules/@next')) let pkgs = await fs.readdir(path.join(tmpdir, 'node_modules/@next'))
await fs.ensureDir(path.join(cwd, 'node_modules/@next')) await fs.ensureDir(path.join(cwd, 'node_modules/@next'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment