Astro on Coolify: Ignoring not compatible lockfile at pnpm-lock.yaml

You have to set the correct pnpm version

Published on

If you are encountering this warning:

WARN  Ignoring not compatible lockfile at pnpm-lock.yaml

Your build will probably fail.


This happens because Nixpacks installs a wrong version of pnpm. Even if it’s just a warning the installation of dependencies will fall apart.

There must have been breaking changes in the pnpm-lock.yaml structure that aren’t valid for new versions of pnpm.

This will produce the “real” error:

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

The solution

The solution is simple but tricky if you don’t know how Nixpacks works.

Put this line:

"packageManager": "pnpm@9.1.4",

In your package.json file.

Then change the version of pnpm to the version you are using.

Once you push the code to your repository, Coolify should retry to build your website. If it doesn’t, go into the project settings on Coolify and do a Redeploy.

Thanks for reading to the end! 🎉

If you’d like to stay in touch Follow me on X and Mastodon.

I'm active in many places on the internet, checkout the footer or the links page.