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

Bug: webpack-cli --verbose throws TypeError: Cannot set property 'stats' of undefined #1443

Closed
aman29271 opened this issue Apr 11, 2020 · 5 comments

Comments

@aman29271
Copy link
Contributor

Describe the bug

What is the current behavior?
webpack-cli --verbose or webpack-cli --verbose --stats verbose throws an error described below.

[webpack-cli] TypeError: Cannot set property 'stats' of undefined
    at StatsGroup.resolveOptions (/home/phoenix/Desktop/webpack-cli/packages/webpack-cli/lib/groups/StatsGroup.js:23:40)
    at StatsGroup.run (/home/phoenix/Desktop/webpack-cli/packages/webpack-cli/lib/groups/StatsGroup.js:33:14)
    at WebpackCLI._handleGroupHelper (/home/phoenix/Desktop/webpack-cli/packages/webpack-cli/lib/webpack-cli.js:220:40)
    at Promise.resolve.then.then.then.then.then.then.then (/home/phoenix/Desktop/webpack-cli/packages/webpack-cli/lib/webpack-cli.js:269:30)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

To Reproduce

Steps to reproduce the behavior:

Use either verbose flag or verbose flag with some value of stats flag.

Expected behavior
Using verbose flags should output everything. If the verbose flag is used with stats flag then it should also output everything if the stats has a valid flag value else, it should also throw a warning if the stats flag value is not a valid one.

Screenshots
Screenshot from 2020-04-11 18-56-15

Please paste the results of webpack-cli info here, and mention other relevant information

System:
    OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
    Memory: 693.40 MB / 7.66 GB
  Binaries:
    Node: 10.15.2 - /usr/bin/node
    Yarn: 1.22.4 - /usr/bin/yarn
    npm: 5.8.0 - /usr/bin/npm
  Browsers:
    Chrome: 80.0.3987.149
    Firefox: 68.6.0esr
  npmPackages:
    webpack: ^4.42.0 => 5.0.0-beta.14 
    webpack-cli: ^3.3.11 => 4.0.0-beta.8 

Additional context

@anshumanv
Copy link
Member

Known issue, being fixed here - #1191

@aman29271
Copy link
Contributor Author

That fix was for master. It's for next though.

@anshumanv
Copy link
Member

Cool, nice work 👍

@aman29271
Copy link
Contributor Author

cheers

@snitin315
Copy link
Member

fixed in #1549

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