DEV Community

Cover image for How to Install pnpm with npm on Windows 11

How to Install pnpm with npm on Windows 11

Ayu Adiati on July 12, 2023

Hey Friends 👋, Not long ago, I contributed to one of Virtual Coffee's repositories. I had to install pnpm because we no longer use yarn. After I i...
Collapse
 
giuliano1993 profile image
Giuliano1993

I recently moved from mac (where i installed and managed everything by command line) to windows. Installing and managing all the packages was the thing that worried me the most, because it's a totally different enviroment. Then after doing some researches, i discovered Chocolatey. I think you could give it a try, it manages all the installation steps by itself. with just a command, i.e. choco install npm it downloads the package, install it and set the env variable. At the end of the process you're ready to go with your new package 😄
I used it and installed also multiple version of PHP and it handle this perfectly!
Yeah, it's pretty evident i like it pretty much, but really if you have to install stuff on windows, give it a try 😄

Collapse
 
adiatiayu profile image
Ayu Adiati

I have Chocolatey. But I'm used to install things with npm, especially because most of docs are pointing to npm 😅

Collapse
 
giuliano1993 profile image
Giuliano1993

Well yes of course, once you enter in the whole npm enviroment you obviously install everything with the npm mackage manager, in this case npm. I use chocolatey for the step before, installing the language/enviroment. Node, python, php and so on. It's amazing for skipping the configuration part making it all ready after one command on terminal

Collapse
 
jerommiole profile image
jrom

This article save my pnpm problem 😁

Collapse
 
adiatiayu profile image
Ayu Adiati

Glad to hear that, Jrom! 😄

Collapse
 
devland profile image
Thomas Sentre

Thanks for sharing. Very useful.

Collapse
 
adiatiayu profile image
Ayu Adiati

Thank you. Glad to hear that it's useful for you 😀

Collapse
 
philipjohnbasile profile image
Philip John Basile

nice newbie tutorial!

Collapse
 
adiatiayu profile image
Ayu Adiati

Thank you, Philip!

Collapse
 
kaidanov profile image
Tzvi Gregory Kaidanov

If pnpm is installed but the where command can't find it, it's likely that pnpm is not in your system's PATH.

pnpm, when installed globally, is usually located in the npm global installation directory. On Windows, this is typically C:\Users\YourUsername\AppData\Roaming\npm.

To verify this, you can check the npm global installation directory with the following command:

This command will return the directory where global npm packages are installed. pnpm should be in the bin subdirectory of this directory.

If pnpm is indeed there, you can add this directory to your system's PATH following the instructions provided in the previous response.

Collapse
 
lilsheikh1 profile image
محمد حسین مسلمی

Sorry, It didn't work, actually I can't find the 'pnpm' in local folder

Collapse
 
adiatiayu profile image
Ayu Adiati

Have you installed the pnpm globally and search it in your program files folder?

You can also try pnpm store path to find it as mentioned in the Stackoverflow below.

stackoverflow.com/questions/554037...