Deployment of NextJS project has suddenly started failing - ERR_PNPM_NO_LOCKFILE

Anonymous
TRIAL

a year ago

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 'ERRPNPMNO_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'.

1 Replies

Anonymous
TRIAL

a year ago

c7772db3-fb07-4266-908a-2140c144bf67


a year ago

make sure you are using pnpm v8 to generate the lockfile


Anonymous
TRIAL

a year ago

Oh, so I just have to downgrade.


Anonymous
TRIAL

a year ago

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.


a year ago

lmfao thank you 🤣


Anonymous
TRIAL

a year ago

Btw, I'm guessing pnpm v9 will work eventually … ?


a year 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 - though I seem to remember that not working so someone so I went with the fix I knew would work


10 months ago

Adding "packageManager": "pnpm@9.7.1" to the package.json fixed the issue for me


Deployment of NextJS project has suddenly started failing - ERR_PNPM_NO_LOCKFILE - Railway Help Station