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

webpack serve fails with TypeError: cli.commandLineArgs is not a function #1814

Closed
marcelgerber opened this issue Sep 20, 2020 · 2 comments
Closed

Comments

@marcelgerber
Copy link

Describe the bug

With webpack-cli@4.0.0-beta.9 and webpack@5.0.0-rc.0, whenever I run webpack serve I only get this error:

[webpack-cli] Promise rejection: TypeError: cli.commandLineArgs is not a function
[webpack-cli] TypeError: cli.commandLineArgs is not a function
    at Object.serve [as default] (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/@webpack-cli/serve/lib/index.js:25:31)
    at Function.run (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/lib/commands/ExternalCommand.js:37:51)
    at Command.<anonymous> (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/lib/utils/arg-parser.js:31:73)
    at Command.listener [as _actionHandler] (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/node_modules/commander/index.js:426:31)
    at Command._parseCommand (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/node_modules/commander/index.js:1002:14)
    at Command._dispatchSubcommand (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/node_modules/commander/index.js:953:18)
    at Command._parseCommand (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/node_modules/commander/index.js:970:12)
    at Command.parse (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/node_modules/commander/index.js:801:10)
    at argParser (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/lib/utils/arg-parser.js:132:27)
    at runCLI (/mnt/c/Users/marce/Programming/owid-grapher/node_modules/webpack-cli/lib/bootstrap.js:25:24)
Done in 1.28s.

To Reproduce

Run yarn webpack serve.

Expected behavior

A webpack dev server starts without errors, like it did with webpack-dev-server before.

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

  System:
    OS: Linux 4.4 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
    Memory: 4.24 GB / 15.75 GB
  Binaries:
    Node: 12.13.1 - /tmp/yarn--1600641529493-0.03936199295081133/node
    Yarn: 1.22.5 - /tmp/yarn--1600641529493-0.03936199295081133/yarn
    npm: 6.14.8 - ~/.nvm/versions/node/v12.13.1/bin/npm
  npmPackages:
    dotenv-webpack: ^3.0.0 => 3.0.0
    eslint-import-resolver-webpack: ^0.12.2 => 0.12.2
    moment-locales-webpack-plugin: ^1.2.0 => 1.2.0
    optimize-css-assets-webpack-plugin: ^5.0.4 => 5.0.4
    tsconfig-paths-webpack-plugin: ^3.3.0 => 3.3.0
    webpack: 5.0.0-rc.0 => 5.0.0-rc.0
    webpack-cli: 4.0.0-beta.9 => 4.0.0-beta.9
    webpack-dev-server: ^3.11.0 => 3.11.0
    webpack-manifest-plugin: 3.0.0-rc.0 => 3.0.0-rc.0

Done in 1.91s.

Additional context

I would think this is because @webpack-cli/serve has not been updated since #1712 landed, and is still at version 1.0.1-alpha.5.

marcelgerber added a commit to owid/owid-grapher that referenced this issue Sep 20, 2020
@anshumanv
Copy link
Member

Thanks for the report, yep the serve package(and I think all sub packages) needs bump and release.

/cc @evilebottnawi

@alexander-akait
Copy link
Member

Yes, let's do release today

Fixed in master

marcelgerber added a commit to owid/owid-grapher that referenced this issue Sep 22, 2020
marcelgerber added a commit to owid/owid-grapher that referenced this issue Sep 26, 2020
marcelgerber added a commit to owid/owid-grapher that referenced this issue Oct 7, 2020
marcelgerber added a commit to marcelgerber/owid-grapher that referenced this issue Nov 11, 2020
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

Successfully merging a pull request may close this issue.

3 participants