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 install --flat should probably show the reason why a package is required #3013

Open
dmitriid opened this issue Mar 29, 2017 · 3 comments

Comments

@dmitriid
Copy link

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

Feature

What is the current behavior?

When running yarn install --flat, yarn may ask multiple questions asking to resolve package versions. However, as it goes deeper down the rabbit whole, it may be beneficial to provide the user with more info as to why particular versions are presented as choices.

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

See dependencies from a current project. Testing-related dependencies are, sadly, outdated, other versions are more or less recent (no more than one week old :) )

Running yarn install --flat with the the deps in the linked file will ask numerous questions for almost every single dependency in the file. A sample:

info Unable to find a suitable version for "inferno", please choose one by typing one of the numbers below:
  1) "inferno@1.4.1, inferno@^1.4.1, inferno@^1.1.1" which resolved to "1.4.1"
  2) "inferno@^1.5.4" which resolved to "1.5.4"
Answer?

info Unable to find a suitable version for "babel-core", please choose one by typing one of the numbers below:
  1) "babel-core@6.23.1" which resolved to "6.23.1"
  2) "babel-core@^6.24.0, babel-core@^6.0.0" which resolved to "6.24.0"
Answer?

...etc...

and nested dependencies:

info Unable to find a suitable version for "ansi-styles", please choose one by typing one of the numbers below:
  1) "ansi-styles@^2.2.1" which resolved to "2.2.1"
  2) "ansi-styles@~1.0.0" which resolved to "1.0.0"
  3) "ansi-styles@^3.0.0" which resolved to "3.0.0"
Answer?

info Unable to find a suitable version for "jsesc", please choose one by typing one of the numbers below:
  1) "jsesc@^1.3.0" which resolved to "1.3.0"
  2) "jsesc@~0.5.0" which resolved to "0.5.0"
Answer?

... etc ...

What is the expected behavior?

It would be nice to find out:

  • why these particular versions were selected
  • why these particular nested dependencies are required and why the conflict (a regular install generates 627 directories in node_modules, so there's no way of knowing a particular dependency at a glance)

The best way would probably be having h as an option to Answer? which would detail the whys and the hows

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

> node -v
v6.9.1
> yarn -V
0.21.3
> system_profiler SPSoftwareDataType
      System Version: macOS 10.12.3 (16D32)
      Kernel Version: Darwin 16.4.0
@BYK
Copy link
Member

BYK commented Oct 30, 2017

Marking as high-priority since people are switching over to Yarn from bower which did flat installs. I think this is an important user experience improvement.

@saboya
Copy link

saboya commented May 13, 2018

So... Is this still high-priority?

@flavienbwk
Copy link

The problem still exists !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants