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](https://answer-overflow-discord-attachments.s3.amazonaws.com/1233319405195235360/image.png)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1233319405568659466/image.png)
7 Replies
Project ID:
c7772db3-fb07-4266-908a-2140c144bf67
c7772db3-fb07-4266-908a-2140c144bf67
Solution
make sure you are using pnpm v8 to generate the lockfile
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.
lmfao thank you 🤣
Btw, I'm guessing pnpm v9 will work eventually ... ?
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