Skip to content

Conversation

@wojtekmaj
Copy link
Contributor

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

n/a

Motivation / Use-Case

Turns out, webpack-cli@<=4.4.0 crashes on webpack serve command when used with webpack-dev-server@4.0.0.
To prevent users from getting stuck or raising unnecessary bug reports, minimum compatible webpack-cli shall be mentioned in migration docs.

Breaking Changes

n/a

Additional Info

Crash on webpack-cli 4.2.0:

/node_modules/webpack-cli/lib/utils/arg-parser.js:59 options.reduce((parserInstance, option) => { ^ TypeError: Cannot read property 'reduce' of undefined at argParser (/node_modules/webpack-cli/lib/utils/arg-parser.js:59:13) at WebpackCLI.argParser (/node_modules/webpack-cli/lib/webpack-cli.js:63:16) at Object.parseArgs [as default] (/node_modules/@webpack-cli/serve/lib/parseArgs.js:26:37) at serve (/node_modules/@webpack-cli/serve/lib/index.js:46:63) at run (/node_modules/webpack-cli/lib/utils/resolve-command.js:33:12) at Command.<anonymous> (/node_modules/webpack-cli/lib/utils/arg-parser.js:34:58) at Command.listener [as _actionHandler] (/node_modules/webpack-cli/node_modules/commander/index.js:426:31) at Command._parseCommand (/node_modules/webpack-cli/node_modules/commander/index.js:1002:14) at Command._dispatchSubcommand (/node_modules/webpack-cli/node_modules/commander/index.js:953:18) at Command._parseCommand (/node_modules/webpack-cli/node_modules/commander/index.js:970:12) 

4.3.0 also produces an error:

[webpack-cli] Unable to load '@webpack-cli/serve' command [webpack-cli] TypeError: devServerFlags is not iterable at /node_modules/@webpack-cli/serve/lib/index.js:28:43 at WebpackCLI.makeCommand (/node_modules/webpack-cli/lib/webpack-cli.js:104:31) at ServeCommand.apply (/node_modules/@webpack-cli/serve/lib/index.js:10:19) at loadCommandByName (/node_modules/webpack-cli/lib/webpack-cli.js:626:35) at Command.<anonymous> (/node_modules/webpack-cli/lib/webpack-cli.js:1091:23) at Command.listener [as _actionHandler] (/node_modules/webpack-cli/node_modules/commander/index.js:922:31) at Command._parseCommand (/node_modules/webpack-cli/node_modules/commander/index.js:1503:14) at Command.parse (/node_modules/webpack-cli/node_modules/commander/index.js:1292:10) at Command.parseAsync (/node_modules/webpack-cli/node_modules/commander/index.js:1318:10) at WebpackCLI.run (/node_modules/webpack-cli/lib/webpack-cli.js:1123:28) 
Turns out, `webpack-cli@<=4.4.0` crashes on `webpack serve` command when used with `webpack-dev-server@4.0.0`. To prevent users from getting stuck or raising unnecessary bug reports, minimum compatible `webpack-cli` shall be mentioned in migration docs.
Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@codecov
Copy link

codecov bot commented Aug 19, 2021

Codecov Report

Merging #3682 (237a15d) into master (d10bcc3) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #3682 +/- ## ======================================= Coverage 93.55% 93.55% ======================================= Files 15 15 Lines 1318 1318 Branches 456 456 ======================================= Hits 1233 1233 Misses 78 78 Partials 7 7 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d10bcc3...237a15d. Read the comment docs.

@alexander-akait alexander-akait merged commit 198bfef into webpack:master Aug 19, 2021
@wojtekmaj wojtekmaj deleted the patch-1 branch August 19, 2021 11:26
@Ch2x
Copy link

Ch2x commented Aug 23, 2021

webpack-cli@4.6.0 the same error,updated to 4.8.0 is worked

@wojtekmaj
Copy link
Contributor Author

4.7.0 works as well. Huh.

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

Labels

None yet

5 participants