0

I need to install the old version of pnpm v6.24.2 for woocommerce-admin current version is 7.9.0 also getting errors while running npm build:

Your pnpm version is incompatible with "/home/user/Desktop/woocommerce-admin".

Expected version: ^6.24.2
Got: 7.9.0

This is happening because the package's manifest has an engines.pnpm field specified.
To fix this issue, install the required pnpm version globally.
Raptor
  • 53,206
  • 45
  • 230
  • 366
nbl007
  • 3
  • 5

1 Answers1

2

You can run:

pnpm install --global pnpm@latest-6

Alternatively, if you use Corepack, you may add this to your package.json:

{
  "packageManager": "pnpm@6.34.0"
}

Corepack automatically manages pnpm versions, so if you will run pnpm inside that project, Corepack will install and run the right version of pnpm.

Zoltan Kochan
  • 5,180
  • 29
  • 38