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

yarn.lock changes after removing node_modules #3588

Closed
targos opened this issue Jun 6, 2017 · 1 comment
Closed

yarn.lock changes after removing node_modules #3588

targos opened this issue Jun 6, 2017 · 1 comment

Comments

@targos
Copy link

targos commented Jun 6, 2017

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

bug

What is the current behavior?

After installing two dependencies with yarn add. Removing node_modules and running yarn again changes yarn.lock.

If the current behavior is a bug, please provide the steps to reproduce.

Shown in the following test repo: https://github.com/targos/yarn-bug-mime-db

  1. Create a new project with a fresh package.json: https://github.com/targos/yarn-bug-mime-db/tree/e58faae8f0ab3b8b3c21e65a3467933b1e54e523
  2. Run yarn add koa@^1.2.0 koa-compress@^1.0.9: https://github.com/targos/yarn-bug-mime-db/tree/b3f36fb85a120fbf5a313c1b4ce11bdb42d251b5
  3. Run rm -rf node_modules && yarn: https://github.com/targos/yarn-bug-mime-db/tree/cfaad20259f70a4c5b734f2a327a6b7f7ec75505

diff between step 2 and 3:

 yarn.lock | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/yarn.lock b/yarn.lock
index 540394d..ca5a414 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -160,11 +160,7 @@ [email protected]:
   version "0.3.0"
   resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
 
-"mime-db@>= 1.27.0 < 2":
-  version "1.28.0"
-  resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.28.0.tgz#fedd349be06d2865b7fc57d837c6de4f17d7ac3c"
-
-mime-db@~1.27.0:
+"mime-db@>= 1.27.0 < 2", mime-db@~1.27.0:
   version "1.27.0"
   resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1"
 

What is the expected behavior?

yarn.lock should not change. I do not know if the correct state is the one after step 2 or after step 3.

Please mention your node.js, yarn and operating system version.

  • Node.js 8.0.0
  • yarn 0.24.5
  • Linux 4.11.3-200.fc25.x86_64
@arcanis
Copy link
Member

arcanis commented Jun 6, 2017

Thanks for the report! I'm going to close it in favor of #3490, which I think is the reason you're experiencing this issue.

@arcanis arcanis closed this as completed Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants