R
Railway7mo ago
Zvezke

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
8 Replies
Percy
Percy7mo ago
Project ID: c7772db3-fb07-4266-908a-2140c144bf67
Zvezke
ZvezkeOP7mo ago
c7772db3-fb07-4266-908a-2140c144bf67
Solution
Brody
Brody7mo ago
make sure you are using pnpm v8 to generate the lockfile
Zvezke
ZvezkeOP7mo 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
Brody7mo ago
lmfao thank you 🤣
Zvezke
ZvezkeOP7mo ago
Btw, I'm guessing pnpm v9 will work eventually ... ?
Brody
Brody7mo 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
Duchess
Duchess4mo ago
New reply sent from Help Station thread:
Adding "packageManager": "[email protected]" to the package.json fixed it for me
You're seeing this because this thread has been automatically linked to the Help Station thread.
Want results from more Discord servers?
Add your server