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

unable to load @webpack-cli/serve command #14443

Closed
zendevil opened this issue Oct 9, 2021 · 3 comments
Closed

unable to load @webpack-cli/serve command #14443

zendevil opened this issue Oct 9, 2021 · 3 comments

Comments

@zendevil
Copy link

zendevil commented Oct 9, 2021

Bug report

What is the current behavior?
doing npm start which runs webpack serve --mode development --env development gives:

[webpack-cli] Unable to load '@webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
    at WebpackCLI.makeCommand (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/lib/webpack-cli.js:108:21)
    at ServeCommand.apply (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/node_modules/@webpack-cli/serve/lib/index.js:41:19)
    at loadCommandByName (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/lib/webpack-cli.js:626:35)
    at Command.<anonymous> (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/lib/webpack-cli.js:1091:23)
    at Command.listener [as _actionHandler] (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/node_modules/commander/index.js:922:31)
    at Command._parseCommand (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/node_modules/commander/index.js:1503:14)
    at Command.parse (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/node_modules/commander/index.js:1292:10)
    at Command.parseAsync (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/node_modules/commander/index.js:1318:10)
    at WebpackCLI.run (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/lib/webpack-cli.js:1123:28)
    at runCLI (/Users/prikshetsharma/Desktop/hello/node_modules/webpack-cli/lib/bootstrap.js:11:19)

If the current behavior is a bug, please provide the steps to reproduce.

follow the steps here:

https://smartcontracts.org/docs/quickstart/local-quickstart.html

webpack config:

https://github.com/zendevil/hello/blob/main/webpack.config.js

What is the expected behavior?

npm start works without an error and localhost:3000 is accessible.

Other relevant information:
webpack version: 5.24.4
Node.js version: v16.10.0
Operating System: macos big sur

@webpack-bot
Copy link
Contributor

For maintainers only:

  • webpack-4
  • webpack-5
  • bug
  • critical-bug
  • enhancement
  • documentation
  • performance
  • dependencies
  • question

@alexander-akait
Copy link
Member

Duplicate webpack/webpack-cli#2990

@alexander-akait
Copy link
Member

Answer webpack/webpack-cli#2990 (comment)

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