We recently updated the version of pnpm to version 9.15.0. Developers will need to update pnpm in their environments to build WooCommerce.
The details
We bumped the pnpm version from 9.1.3 to 9.15.0. This gives us access to new features and bug fixes released by the pnpm team. Along with the bump, we are addressing some frictions related to pnpm version bumps and working with multiple projects requiring different versions of pnpm.
The technical side includes using the packageManager
field in package.json to manage the necessary version of pnpm and updating monorepo git-hooks to enable corepack for automatic switching between pnpm versions. With these changes, we expect future bumps to require no manual update steps.
How can I tell if this affects me?
Who is affected?
Anyone building on the WooCommerce repo who has not yet enabled Corepack in their development environment.
What do you need to do?
If you’ve recently pulled the latest changes (last updated on January 13th, 2025), you will need to upgrade your pnpm package.
How will you know if you’re affected?
If you have pnpm in your environment, it will notify you of any version mismatch.
What action should I take?
The development environments might differ, but the main prerequisite for the update is to ensure pnpm is not set up globally. We’ll cover that in the following steps.
1: ensure to pull changes from repository
2: run nvm use && pnpm -v
—if the output is 9.15.0
, you can skip the remaining steps. Otherwise, continue to the next step.
3: run corepack enable pnpm && pnpm -v
—if the output is 9.15.0
, you can skip the remaining steps. Otherwise, continue to the next step.
4: run pnpm rm -g pnpm && pnpm -v
—the output should be 9.15.0
If after step 4, you still don’t see 9.15.0
, it indicates some issues with resolving the path to pnpm binary.
With the previous steps executed, we expect pnpm binary path to be resolved to something like some-path-here/node/v20.18.1/bin/pnpm
. To troubleshoot your setup, you can run which pnpm && echo $PATH
and analyze why binary is not resolved as expected.Â
Leave a Reply