Node + PNPM ( PERFORMANT NODEJS PACKAGE MANAGER )
How to install the pnpm node package manager in Linux?
You can install PNPM with the debian distro. PNPM is faster and more disk space efficient.
You can install pnpm with one single command in Linux. To install pnpm, you need a one-off curl or wget command.
Suppose you have the curl command already installed in the distro. Otherwise, firstly install the curl command or use any other command.
// Please install one of them according to the requirement.sudo apt-get install curl orsudo apt-get install wget
In this article, I show you how to install the pnpm package with curl and wget commands. In both commands, you do not need to add any other configuration to .bashrc
file. Most of the time curl and wget automatically config the pnpm configuration in .bashrc
file on installation time.
To install pnpm, run one of the following commands.
Steps
- Install with
curl
command - Install with
wget
command
Install with curl
command
You can install the pnpm latest version with the curl command. Simple copy-paste the following command in your terminal to install pnpm.
curl -fsSL https://get.pnpm.io/install.sh | sh -
After installation is complete. You check the cross configuration with .bashrc
or .bash_profile
file. Your configuration looks different, and your configuration is shown in the terminal.
# Next configuration changes were made:export PNPM_HOME="/home/rajdeepsingh/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
Following configuration, exit already. Then skip this section. You do not need to add code in .bashrc
.
Install with wget
command
You can install the pnpm latest version with the wget command. Simple copy-paste the following command in your terminal to install pnpm.
wget -qO- https://get.pnpm.io/install.sh | sh -
After installation is complete. You can check the cross configuration with .bashrc
or .bash_profile
file. Your configuration looks different, and your configuration is shown in your terminal.
# Next configuration changes were made:export PNPM_HOME="/home/rajdeepsingh/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
Following configuration, exit already. Then skip this section and You do not need to add the pnpm configuration code in .bashrc
or .bash_profile
file.
Verify pnpm configuration
Errors
After running the pnpm version command, you face any errors.
- Firstly close and reopen your terminal.
- If the error is not resolved with the first step, then restart your laptop or pc.
- Your error not be solved with one and second steps, which means your pnpm configuration is not added successfully in the .bashrc file.
Conclusion
PNPM is a great nodejs package manager for nodejs. PNPM provide similar functionality to yarn and npm.
PNPM is faster and more disk space efficient than other node package managers. Therefore, I recommended using the PNPM instead npm and yarn.
You can share and follow on Twitter and Linkedin. If you like my work, please read more content on the officialrajdeepsingh. dev, frontend web, and sign up for a free newsletter on the frontend web.