poor UX when resetting lockfiles #6962
Replies: 1 comment
-
The lockfile is your known good state. By throwing that away and resolving everything again you get a different set of packages, so breakage is a definite possibility. Yarn curates the
It'd be nice if you had included details on that so we can determine if there is an actual bug
That'd be a good feature request |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
yarn overcomplicates the process of resetting all lockfiles, junkfiles, etc.
.yarn,.pnp.*, andyarn.lock, then the nextyarn installfails. This command should understand how to regenerate everything again, likenpm install, based on an existingpackage.jsonfile. Instead, it bails with an assortment of confusing options.yarn initalways forcibly overwrites existingpackage.jsonfiles. Instead, it should first check whether the file exists. Only overwrite if the file definitely does not exist.So the workaround workflow involves manually backing up my
package.jsonfile, runningyarn init, and replacing the stubpackage.jsonfile from my backup. That's risky, manual, and unintuitive. We're moving backwards from npm capabilities.Beta Was this translation helpful? Give feedback.
All reactions