Deployment of NextJS project has suddenly started failing - ERR_PNPM_NO_LOCKFILE

Suddenly, one of my services (a NextJS project) has started failing whenever it is redeployed (due to random updates in my project) What confuses me is that I am getting error 'ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent' even though the project has the pnpm.lock. I have tried rebuilding the file - deleting it and 'pnpm i'.
No description
No description
Solution:
make sure you are using pnpm v8 to generate the lockfile
Jump to solution
7 Replies
Percy
Percy5w ago
Project ID: c7772db3-fb07-4266-908a-2140c144bf67
Zvezke
Zvezke5w ago
c7772db3-fb07-4266-908a-2140c144bf67
Solution
Brody
Brody5w ago
make sure you are using pnpm v8 to generate the lockfile
Zvezke
Zvezke5w ago
Oh, so I just have to downgrade. Solved. Thanks a lot, Brody. You once helped me work out a dockerfile for one of my projects. As a token of my appreciation, I promised you Carlsberg and Scandinavian women in return - now even more Carlsberg and Scandinavian women are coming your way. 🙂 I've marked this as solved, but I don't know how to mark your reply as the answer.
Brody
Brody5w ago
lmfao thank you 🤣
Zvezke
Zvezke5w ago
Btw, I'm guessing pnpm v9 will work eventually ... ?
Brody
Brody5w ago
it's always going to work if you where to use a Dockerfile 😉 but for nixpacks you should theoretically be able to specify pnpm v9 as shown here - https://nixpacks.com/docs/providers/node#corepack though I seem to remember that not working for someone so I went with the fix I knew would work