pnpm
Installing pnpm
pnpm is managed via Corepack, which ships with Node.js >= 16.13.0. Corepack reads the packageManager field in the root package.json and automatically uses the correct pnpm version — no manual pnpm installation required.
To enable Corepack, run:
corepack enable
After that, pnpm will be available and pinned to the version declared in package.json. You can verify it is working with:
pnpm --version
Note: If you have pnpm installed via another method (e.g.
npm i -g pnpm), Corepack may conflict with it. It is recommended to uninstall any globally installed pnpm and rely solely on Corepack.
Updating pnpm
To update the pnpm version, follow these steps:
-
Update the
packageManagerfield in the rootpackage.jsonto the desired version:"packageManager": "pnpm@x.x.x" -
Execute the commands below to ensure the installation is successful:
pnpm install && pnpm run setup -
Verify that the top-level
package.jsonfile includes thepackageManagerfield with the updated version. -
Update the
packageManagerfield in thepackage.jsonfile located atteraslice/packages/teraslice-cli/test/fixtures/testAssetWithBuildto match the updated pnpm version. After making the change, run the following command in the same directory to update the lock file:pnpm install -
Update the
packageManagerfield in thepackage.jsonfile located in theteraslice/websitedirectory to reflect the updated pnpm version.