In the repository of a project, I already have package.json and yarn.lock files. I'm updating the version of a particular package from version 2.0.14 to version 2.0.16.
When I do yarn install or just yarn, I can see the changes related to the updated package but the yarn.lock file is not updating.
Is there is any command to generate the updated yarn.lock file?
Try using
yarn install --forceas this will re-download all packages (in their locked versions unless too old) and refresh the lock file if necessary.yarn installshould already do this, but in case it doesn't, you can force it to.