Yarn: What is the proper way to update yarn.lock to latest versions?

Created on 15 Jan 2018  路  2Comments  路  Source: yarnpkg/yarn

I use latest as a version for @theia/core dependency. After the first install, v0.2.3 was locked in yarn.lock, which was the latest version by then. Now latest is v0.3.2 and I want to upgrade yarn.lock to it. How can I do it?

I've tried yarn --force but it does not seem to do anything. Is it expected?

As a workaround, I've deleted yarn.lock and run yarn again.

triaged

Most helpful comment

I believe the command yarn upgrade @theia/core --latest should be what you want.

That should update package.json to point to the latest version number (probably ^0.3.2) and also update the yarn.lock file.

All 2 comments

I believe the command yarn upgrade @theia/core --latest should be what you want.

That should update package.json to point to the latest version number (probably ^0.3.2) and also update the yarn.lock file.

ERR MSG :(Your lockfile needs to be updated, but yarn was run with --frozen-lockfile.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.)
i hade this error on my project . how can i fix it?

Was this page helpful?
0 / 5 - 0 ratings