Merged bot pull request, docker build failure due to frozen lockfile
actuallyitsnathaniel
HOBBYOP

2 years ago

As the title says, I merged a bot-generated pull request to update Strapi from 4.20.3 to 4.21.1. It builds fine locally, but the frozen lockfile in Docker looks like it needs to be updated. The log reads:

13.37 error Your lockfile needs to be updated, but yarn was run with --frozen-lockfile.

Any idea on how to fix this remote environment issue? It's happened numerous times before and I've just reverted every time, but I'd like to update.

View Deploy details

ⓘ Deployment information is only viewable by Project members and Railway admins.

Solved

7 Replies

2 years ago

Your lock file is out of sync, you would need to resync with yarn install

Make sure you run this command with yarn v1.


Status changed to Solved Railway almost 2 years ago


actuallyitsnathaniel
HOBBYOP

2 years ago

that's what i've done in the past, just for giggles i tried again but that has never solved the issue. i've deleted the lockfiles and tried again as well to no avail. where specifically are you saying i should run yarn install?


2 years ago

In the project with the out of sync lock file.


actuallyitsnathaniel
HOBBYOP

2 years ago

let me clarify. i've done both yarn install and railway run yarn install in the directory of my project. then i built and ran it locally with no issues. once i commit and push my changes, the build fails. what other options are there?


2 years ago

Railway uses yarn 1, are you using yarn 1?


actuallyitsnathaniel
HOBBYOP

2 years ago

ah shoot, i'm not. my version shows i'm on 3.2.0.

however, quick pivot. i just decided to jump back to npm and removed the custom commands that used yarn in my project's settings and also removed the yarn.lock file altogether. lo and behold everything built fine with a successful deployment ✨💀

still, thank you for the insight on the yarn version. if i end up switching back to yarn, i'll make sure to set it correctly in the project


2 years ago

Sounds good!


Loading...