pnpm

How to install pnpx


I installed pnpm on linux with

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

as explained at https://pnpm.io/installation . With this I got just pnpm but no pnpx installed. How can I install pnpx?

Since pnpx is deprecated, can it be that it does not exist anymore? see https://pnpm.io/pnpx-cli


Solution

  • We're planning to deprecate pnpx. Use pnpm dlx and pnpm exec instead of pnpx. You may create an alias in your shell if you still want to call pnpx instead of pnpm dlx:

    alias pnpx='pnpm dlx'
    

    Also, for now pnpx is installed using the installation methods described here

    On Linux or macOS:

    curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
    

    On Windows (PowerShell):

    Invoke-WebRequest 'https://get.pnpm.io/v6.16.js' -UseBasicParsing -o pnpm.js; node pnpm.js add --global pnpm; Remove-Item pnpm.js
    

    Or using npm npm i -g pnpm.