webpack serve
[webpack-cli] Promise rejection: TypeError: Class constructor ServeCommand cannot be invoked without 'new'
[webpack-cli] TypeError: Class constructor ServeCommand cannot be invoked without 'new'
at run (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\lib\utils\resolve-command.js:33:12)
at Command.<anonymous> (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\lib\utils\arg-parser
.js:32:58)
at Command.listener [as _actionHandler] (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\nod
e_modules\commander\index.js:426:31)
at Command._parseCommand (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\node_modules\comma
nder\index.js:1002:14)
at Command._dispatchSubcommand (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\node_modules
\commander\index.js:953:18)
at Command._parseCommand (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\node_modules\comma
nder\index.js:970:12)
at Command.parse (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\node_modules\commander\ind
ex.js:801:10)
at argParser (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\lib\utils\arg-parser.js:145:27
)
at parseArgs (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\lib\bootstrap.js:18:29)
at runcLI (F:\LearnCode\Front-end\MicroFrontend\products\node_modules\webpack-cli\lib\bootstrap.js:24:24)
重新安装 webpack-cli,不指定版本,直接下载最新版。可能是版本过低导致的。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。