Install pnpm

pnpm is a Node Package Manager and Node Version Manager to install and manage multiple Node.js version and a central repository of node modules

First uninstall

nvm

Node.js

On Windows

Uninstall Node.js in Settings/ Apps / Installed Apps

Install pnpm

Open a PowerShell terminal and execute

Invoke-WebRequest https://get.pnpm.io/install.ps1 -UseBasicParsing | Invoke-Expression

IMPORTANT: Close and re-open all terminals and Visual Studio Code for the Path changes to take effect

Create an alias for PNPM in PowerShell. In an Administrator PowerShell window execute

 notepad $profile.AllUsersAllHosts

Save the following in the file

set-alias -name pn -value pnpm

Create an alias for the Bash terminal. In a terminal execute

code C:\Users\MY_USER_NAME\.bashrc

Save the following in the file

alias pn=pnpm

Install Node.js

Install the latest LTS (Long Term Support) version of the Node.js framework

pnpm env use --global lts

Install tsup

tsup is a fast TypeScript bundler that gains popularity. To install it as a dev dependency in the current project, in the root of the repo execute:

pnpm add tsup -D

Leave a comment

Your email address will not be published. Required fields are marked *