A brand new Rails 6.1.4.1 app fails to run bin/webpack-dev-server
with the following error:
/rails_app/node_modules/webpack-cli/bin/utils/prompt-command.js:46
return func(...args);
^
TypeError: Class constructor ServeCommand cannot be invoked without 'new'
at runWhenInstalled (/rails_app/node_modules/webpack-cli/bin/utils/prompt-command.js:46:9)
at promptForInstallation (/rails_app/node_modules/webpack-cli/bin/utils/prompt-command.js:140:10)
at /rails_app/node_modules/webpack-cli/bin/cli.js:32:43
at Object.<anonymous> (/rails_app/node_modules/webpack-cli/bin/cli.js:366:3)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Module.require (internal/modules/cjs/loader.js:961:19)
at require (internal/modules/cjs/helpers.js:92:18)
"@rails/webpacker": "5.2.1",
and"webpack-dev-server": "^3.11.2"
to get back to a functional webpacker. Also related, for anyone hunting this down further: dev.to/arisa_dev/…