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

yargs "Too many arguments" with v2.8.x #1087

Closed
1 of 2 tasks
purdrew opened this issue Sep 14, 2017 · 6 comments
Closed
1 of 2 tasks

yargs "Too many arguments" with v2.8.x #1087

purdrew opened this issue Sep 14, 2017 · 6 comments

Comments

@purdrew
Copy link

purdrew commented Sep 14, 2017

  • Operating System: MacOS 10.12.6
  • Node Version: v7.10.0
  • NPM Version: 4.2.0
  • webpack Version: 2.7.0
  • webpack-dev-server Version: 2.8.0 and 2.8.1
  • This is a feature request
  • This is a bug

Code

Sample code here

Expected Behavior

The dev server should start cleanly.

Actual Behavior

Startup of the webpack-dev-server is producing the following error:

YError: Too many arguments provided. Expected max 2 but received 3.
    at module.exports (.../node_modules/webpack-dev-server/node_modules/yargs/lib/argsert.js:31:13)
    at Object.Yargs.self.alias (.../node_modules/webpack-dev-server/node_modules/yargs/yargs.js:244:5)
    at module.exports (.../node_modules/webpack/bin/config-yargs.js:12:4)
    at Object.<anonymous> (.../node_modules/webpack-dev-server/bin/webpack-dev-server.js:56:36)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)

I'm guessing the yargs bump from ^6.0.0 to ^8.0.2 here caused this regression.

How can we reproduce the behavior?

  1. Download files from gist
  2. npm install
  3. npm build
  4. npm start
  5. See error in terminal

I understand that updating to webpack 3.5.x would resolve this but I feel this was an unnecessary breaking change.

@purdrew purdrew changed the title yargs "Too many arguments" and SockJS not found on Safari/iOS with v2.8.x yargs "Too many arguments" with v2.8.x Sep 14, 2017
@shellscape
Copy link
Contributor

@deedubbu could you explain in more verbose detail why you believe that yargs and a dependency on webpack@3.5.x is breaking this?

@PatrickMcGrath29
Copy link

Also getting this behavior

@shellscape
Copy link
Contributor

@PatrickMcGrath29 please avoid "me as well" replies on issues. rather, please use the reaction buttons on the OP https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments

@shellscape
Copy link
Contributor

shellscape commented Sep 14, 2017

We discussed it and will downgrade for the next patch release. However, it's important to note that webpack-dev-server v3 will leverage webpack@3.

@deedubbu also of note: your node version exited LTS in June, and it looks like you could go for an update with some additional deps. out-of-LTS node versions are hard to get support for, and most major projects won't support a version that isn't within an LTS cycle.

@purdrew
Copy link
Author

purdrew commented Sep 14, 2017

Do you know a timeframe for the next patch release?

The code I posted was just a minimal scenario and not my actual app. The package.json uses a >= range for the node engine version. As indicated in the issue, I'm currently using v7.10.0 locally but am using the LTS of v6.11.3 in production for the real app. For this issue the version of node is irrelevant.

@purdrew
Copy link
Author

purdrew commented Sep 14, 2017

I see 2.8.2 was released. Fixes the issue. Thanks! 👍

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

3 participants