Skip to content

Instantly share code, notes, and snippets.

@kenmori
Last active May 20, 2024 09:20
Show Gist options
  • Save kenmori/2b31d0cde603751cf92afe2e2bb20263 to your computer and use it in GitHub Desktop.
Save kenmori/2b31d0cde603751cf92afe2e2bb20263 to your computer and use it in GitHub Desktop.
error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`

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

if you update your package.json only. and then run yarn install --frozen-lockfile

The above error show you on console.

it's say that you need to run just yarn install.

--fronzen-lockfile option is tell you need to update your lock.file which will be much dependency of package in your package.json.

It's possible to occure in server when you deploy. if there are your changed package.json that pushing to git repogitory already in server , But you forget to change yarn.lockfile and have not been git it, run above command (--forzen-lockfile). you notice that your forgot it.

@chris-activewrite
Copy link

@nik-neg you said:

if both files package.json and yarn.lock are present

I think you meant if both files package-lock.json and yarn.lock are present, right?

@benardelia
Copy link

this solve my issue thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment