https://medium.com/@jmbost20/troubleshooting-pnpm-setup-f6423da9f05d
Background about Article
I was recently trying to download PNPM to run a friends next.js app and was having problem that my terminal couldn’t recognize the “install pnpm”. I was more accustomed to npm for running the development server (npm run dev), so I was excited by the opportunity to learn something new.
PNPM is an efficient and fast package manager for JavaScript, known for its unique approach to handling node modules through symlinks. This not only saves significant disk space but also ensures strict dependency management, making it an attractive choice for large-scale projects.
The process began with the following instructions to get the repository up and running: The following were the instructions to get the repo running: Instructions
- git clone https://github.com/yourfriendsrepo
- cd testdir
- pnpm install
- pnpm run setup # Depends on the repo
- pnpm dev
I would get to the pnpm install step and it wouldn’t work. I was met with: “zsh: command not found: pnpm”
So, I then tried to download pnpm with:
npm install -g pnpm
Perplexingly pnpm install still wouldn’t work, After researching, I had come to the conclusion that one of two things was the case:
- pnpm package manager was not installed on the system
- it is not available in the system's PATH
It was clear that it wasn’t in the system’s path, as I had just tried installing it a variety of times with different flags, so thus began my call to action to document this for future user’s of PNPM that might come across this issue.