I keep getting "frozen-lockfile" in my recent builds when adding packages

santiarrPRO

a year ago

Whenever I add a new package and build for prod the build fails with "frozen-lockfile". It works again whenever i delete the pnpm lock and reinstall all deps

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

9 Replies

1.164  ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

This is the actual error. You should include your pnpm lockfile in your repository.


santiarrPRO

a year ago

I have that's the weird part, it's not in the git ignore and I have made sure to stage and push it


santiarrPRO

a year ago

it could maybe have to do with the fact that I upgraded pnpm recently:``` WARN  Ignoring not compatible lockfile at /app/pnpm-lock.yaml```


a year ago

Railway uses pnpm V8 by default.


santiarrPRO

a year ago

Railway uses pnpm V8 by default.

oh thank you I see, is there a way to change that or should I upgrade?saw this: https://github.com/railwayapp/nixpacks/issues/1091


a year ago

You should be able to set a packageManager field in your package.json to something like pnpm@9.1.0


santiarrPRO

a year ago

Okay thank you, the above link worked so I'll stick with that for a bit and revisit if I encounter an issue again :)


a year ago

If my solution works then it would be far preferred over overwriting the install command.


santiarrPRO

10 months ago

unfortunately that did not work