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

Cannot add "progress" module #2220

Closed
19h opened this issue Dec 10, 2016 · 5 comments
Closed

Cannot add "progress" module #2220

19h opened this issue Dec 10, 2016 · 5 comments

Comments

@19h
Copy link

19h commented Dec 10, 2016

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

What is the current behavior?

$ yarn add progress
yarn add v0.17.10
error Missing list of packages to add to your project.

Works for all other modules; a workaround is npm i --save progress and then yarn.

What is the expected behavior?

install and add the module

Environment

yarn v0.17.10
node 7.2.1
OS information is classified, sorry.

@mlcdf
Copy link

mlcdf commented Dec 11, 2016

Same problem here. My environment:

  • yarn v0.17.10
  • node 6.9.1
  • ubuntu 16.10

Thanks for the workaround @KenanSulayman. 👍

@iredchuk
Copy link
Contributor

The issue is in src/cli/index.js, when commander parses args and progress becomes the first argument besides startArgs (node yarn), it is parsed as an option since --no-progress option is defined above.

A quick fix would be to add commandName back when parsing args, but that looks like a workaround: https://gist.github.com/iredchuk/689e7cf949e22c708b68befb7662855d

@iredchuk
Copy link
Contributor

Didn't work with commander before, but this behaviour looks weird to me: the last case is what's happening here when the arg is lost due to the name collision with an option: https://gist.github.com/iredchuk/ab253c68a880d45e0ab99d853fc56ddc

Wonder if it's possible to change this via some commander settings, e.g. do not parse arg as option when it's not preceded with '--'?

@tuures
Copy link
Contributor

tuures commented Dec 13, 2016

workaround: yarn add -- progress, note space between -- and package name, the doubledash instructs yarn not to parse options after that point

@iredchuk
Copy link
Contributor

Duplicate of #2112

@wyze wyze closed this as completed Dec 14, 2016
@wyze wyze added the duplicate label Dec 14, 2016
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

5 participants