Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent state of package.json/yarn.lock on execution error #1912

Closed
maybeec opened this issue Nov 17, 2016 · 3 comments
Closed

inconsistent state of package.json/yarn.lock on execution error #1912

maybeec opened this issue Nov 17, 2016 · 3 comments
Assignees
Labels
cat-bug fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@maybeec
Copy link

maybeec commented Nov 17, 2016

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
In case of errors like #1861, yarn may finish in an invalid state. It happened to me while removing a dependency, which has been removed from the package.json, but not from the yarn.lock. Subsequent executions of the command resulted in

$ yarn remove bootstrap-css-only
yarn remove v0.17.3
[1/2] Removing module bootstrap-css-only...
error This module isn't specified in a manifest.
info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this command.

If the current behavior is a bug, please provide the steps to reproduce.
As try to remove some dependencies while having scoped packages in you build as well. As #1861 is not determinitic, you may have to do it some times to reproduce.

What is the expected behavior?
When failing, yarn should preserve the consistency of package.json and yarn.lock

Please mention your node.js, yarn and operating system version.
yarn 0.17.3
win7 64bit
node 6.9.1

@bestander
Copy link
Member

Agree, I think we silence errors in build phase, this should not happen

@bestander
Copy link
Member

Please send a PR and test

@paul-soporan
Copy link
Member

In case this hasn't already been fixed in v1, it's definitely fixed in v2 (https://yarnpkg.com/getting-started/migration), so closing.

@paul-soporan paul-soporan added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat-bug fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

4 participants