What does the issue look like?
The command moved into a separate package: @webpack-cli/serve Would you like to install serve? (That will run yarn add -D @webpack-cli/serve) (yes/NO) : yes
bin/webpack-dev-server in a Rails project
Then after selecting
yes and running the
bin/webpack-dev-server command again
TypeError: Class constructor ServeCommand cannot be invoked without 'new' ... return func(...args); ^ TypeError: Class constructor ServeCommand cannot be invoked without 'new'
The Webpack Dev Server2 has recently been updated from version
This upgrade seems to have changed the underlying Node command to start the dev server from
There are 2 possible solutions to this issue.
For client/production projects it would be advisable to choose option 1 - downgrading Webpack Dev Server2 to version
For side projects it should be safe enough to choose option 2 - upgrading Webpacker1 to (beta) version