How to upgrade pnpm version of project

I've been following Theo's new tutorial and upgraded pnpm while in the middle of the project. It now won't let me use pnpm on the project anymore because they updated it from v8 to v9. I can't seem to figure out how I am supposed to upgrade the project to the new version. Is there a way to do this? The only way I could figure out how to keep working is to uninstall pnpm and install the old version, but this doesn't seem like the ideal way to handle things.
10 Replies
mchisolm0
mchisolm08mo ago
Did you try googling how to do it? I think it depends on if you are on Mac/Windows/Linux if you are saying change the version of pnpm. Is that what you were saying you changed the version of? What was the command you ran?
nvk
nvkOP8mo ago
Yeah I googled a bunch. I'm on mac. This is the error: ERR_PNPM_BAD_PM_VERSION  This project is configured to use v8.15.7 of pnpm. Your current pnpm is v9.0.2 I get it when I try to run any pnpm command on the project. Here's what I did to get in this state: 1. Set up the project with pnpm 8 2. Updated my installation of pnpm with homebrew to the latest version (now 9) 3. Run pnpm dev on the project
mchisolm0
mchisolm08mo ago
Searching: “mac pnpm homebrew revert to previous version” gave me this stack overflow. https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula
Stack Overflow
Homebrew install specific version of formula?
How do I install a specific version of a formula in homebrew? For example, postgresql-8.4.4 instead of the latest 9.0.
nvk
nvkOP8mo ago
Yeah like I said in my first post I got it working by installing the old version. I’m not asking about that. I’m wondering about how to upgrade the actual project itself.
noblica
noblica8mo ago
Does the package.json have a predefined version of pnpm it's trying to force? Maybe something under packageManager?
nvk
nvkOP8mo ago
Yes. I wasn’t sure if I could change that without causing issues. Trying to understand if there is an upgrade process for projects.
noblica
noblica8mo ago
You bump the version, and see if anything breaks 🤷‍♂️ I'm guessing it's there for a reason, so I wouldn't mess with it. But feel free to try.
janusqa
janusqa7mo ago
What worked for me was setting the the COREPACK_ENABLE_STRICT environment variable to 0 on vercel. The suggestion was in the error message and was the quickest way to get it to deploy for me to finish this thing.
Jason
Jason6mo ago
Did you end up finishing the tutorial without issues by doing this?
janusqa
janusqa6mo ago
For me it was rough, but that was because I came with the mindset to check out server actions. But I was constantly debugging (I thought I would breeze thru until that part) and then server actions was just a minute part, so I stopped just after that without completing. I got a nice explanation for use client, use server, and server-only, so was happy about that
Want results from more Discord servers?
Add your server