1 min read 138 words Updated Sep 24, 2026 Created Sep 24, 2026
#JavaScript#Nodejs#tool

Is a performant package manager, as an alternative to NPM.
PNPM is used as the default in Vite Plus.

Basic commands

pnpm add= npm install <library>

pnpm install= npm install

pnpm <command>= npm run <command>

Install as dev dependency: pnpm add -D

Package runner, (as alternative to npx): pnpm dlxor pnpx

Update outdated dependencies

Show outdated packages: pnpm outdated

Automatically update to latest versions: pnpm upgrade

package.json

In the package.json, a pnpmobject can be placed, e. g. used for listing which dependencies are allowed to be built at installation:

  "pnpm": {
    "onlyBuiltDependencies": [
      "better-sqlite3"
    ]
  },

This is often required for better-sqlite3.

PNPM for Container builds

  • pnpm install --frozen-lockfile to not generate a lockfile and fail, if lockfile is out of sync.
  • pnpm install --prod to not install devDependencies