---
title: "pnpm"
description: "Install pnpm in WSL with its standalone script and use it as your Node.js package manager."
canonical_url: "https://vinicunca.dev/windows-dev/guide/pnpm"
---
# pnpm

> Install pnpm in WSL with its standalone script and use it as your Node.js package manager.

[pnpm](https://pnpm.io/) is the package manager Vinicunca projects use. It keeps one content-addressable store on disk and hard-links files into each project's `node_modules`, so shared packages are not copied per repo.

Install it **inside WSL** with the standalone script. Do not use Corepack: Node.js 25+ no longer bundles it, and even on Node 24 it is experimental and easy to get out of date.

## Install

```bash
curl -fsSL https://get.pnpm.io/install.sh | sh -
```

The script unpacks pnpm under `~/.local/share/pnpm` and appends to `~/.zshrc`. Open a new terminal tab (or `source ~/.zshrc`) and confirm:

```bash
pnpm --version
```

Pin a major if you need to:

```bash
curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=10 sh -
```

> [!WARNING]
> 
> Never run the installer or `pnpm` with `sudo`. pnpm 12 refuses `self-update` and similar commands under root (`ERR_PNPM_SUDO_NOT_SUPPORTED`) because its store and config live in your home directory.

## Why this instead of Corepack or npm?

- **Corepack** stopped shipping with Node.js 25. On older lines you still had to `corepack enable`, and signatures have been stale enough that pnpm's own docs tell you to update Corepack first.
- **npm i -g pnpm** works, but then pnpm's version is tied to whichever Node fnm has selected. The standalone binary stays on your `PATH` across Node upgrades.
- Install **in Linux**, not with WinGet's Windows pnpm. Windows Defender has also been known to quarantine that Windows binary; you do not need it if all projects live in WSL.

## Everyday commands

```bash
pnpm install            # install from pnpm-lock.yaml
pnpm add vue            # dependency
pnpm add -D vitest      # dev dependency
pnpm remove vue
pnpm update
pnpm run dev            # or: pnpm dev
pnpm dlx nuxi@latest init my-app
pnpm self-update        # update the pnpm binary
```

The store location is `pnpm store path` (typically under your Linux home). Keep projects in the Linux filesystem so installs stay fast — see [WSL](https://vinicunca.dev/windows-dev/guide/wsl#files-and-performance).

> [!TIP]
> See: /windows-dev/guide/vscode
> 
> Next: connect VS Code to WSL and set up ESLint.

---

- [Install docs](https://pnpm.io/installation)


## Sitemap

See the full [sitemap](https://vinicunca.dev/sitemap.md) for all pages.
