pnpm Support
Support for pnpm
is currently experimental. To enable it, ensure that the environment variable VOLTA_FEATURE_PNPM
is set to 1
. On Windows, this can be added to your user or system environment variables in the System Settings. On Linux/Mac, you can set the value inside of your profile script (e.g. .bash_profile
, .zshrc
, or similar).
As this support is experimental, there may be some outstanding issues. Some of the known limitations are listed below, however if you run into anything while using pnpm
with Volta that doesn't work the way you would expect, please open an issue on our GitHub.
Known Limitations
Global Installations
Currently, global installations (e.g. pnpm install -g
) are not supported and will result in an error.
Migrating
There is no automatic migration at the moment, so if you previously had pnpm
installed as a Volta global, you will need to manually re-install it by calling volta install pnpm
. Before enabling the support and doing the re-install, you may uninstall the previously installed pnpm
package via volta uninstall pnpm
. Once you switch to the native pnpm support, you may not remove the isolated old pnpm
package by calling the same command because lack of uninstall implementation as of now.
Enabling pnpm Support
On Unix (Linux/macOS)
Add the following line to your shell profile (.bashrc
, .zshrc
, etc.):
export VOLTA_FEATURE_PNPM=1
Then reload your shell or run:
source ~/.bashrc # or your specific profile file
On Windows
- Open the Start menu and search for "Environment Variables"
- Click on "Edit the system environment variables"
- In the System Properties window, click on "Environment Variables"
- Under "User variables", click "New"
- Enter "VOLTA_FEATURE_PNPM" as the variable name and "1" as the value
- Click "OK" to close all dialogs
Using pnpm with Volta
Once you've enabled pnpm support, you can:
- Install pnpm as your default package manager:
volta install pnpm
- Pin a specific pnpm version in a project:
volta pin pnpm@7.14.0
- See installed pnpm versions:
volta list pnpm
Troubleshooting
If you encounter issues with pnpm in Volta:
Verify the feature flag is set correctly:
- On Unix:
echo $VOLTA_FEATURE_PNPM
- On Windows:
echo %VOLTA_FEATURE_PNPM%
- On Unix:
Check if pnpm is properly installed:
- Run
volta list
to see if pnpm appears in the list
- Run
For any other issues, please report them on the Volta GitHub repository.