Skip to content
GuidesPNPM Installation

PNPM Installation and Usage

PNPM is a fast and efficient package manager, serving as an alternative to npm and yarn, making it the preferred choice for managing dependencies in The A Team resources. This guide walks you through its installation and basic usage.


Step 1: Install PNPM

To install PNPM, ensure Node.js is installed on your system. If you haven’t done that yet, refer to the Node.js Setup Guide.

  1. Open PowerShell.
  2. Run the following command to install PNPM globally:
    Invoke-WebRequest https://get.pnpm.io/install.ps1 -UseBasicParsing | Invoke-Expression
  3. Verify the installation by checking the version:
    pnpm --version

Step 2: Basic Commands

Here are some common commands you’ll use with PNPM:

  • Install dependencies:
    pnpm install
  • Add a dependency:
    pnpm add <package-name>
  • Remove a dependency:
    pnpm remove <package-name>
  • Run a script (as defined in package.json):
    pnpm run <script-name>

Step 3: Example Workflow

Most of The A Team resources include a package.json file for managing dependencies and scripts. Here’s an example of a typical workflow:

  1. Install dependencies:
    pnpm install
  2. Run the build script:
    pnpm build
  3. Start the application:
    pnpm start

Step 4: Why Use PNPM?

  • Efficiency: PNPM uses hard links and symlinks, saving disk space by avoiding duplication of dependencies.
  • Speed: PNPM is faster than npm or yarn due to its unique architecture.
  • Reliability: It ensures consistent dependency resolution across environments.

For more information, visit the official PNPM documentation.