无法启动 jhipster 项目的前端应用程序

not able to start frontend app of jhipster project

我创建了一个 jhipster 项目。但是我无法使用 mvnw 命令 运行 应用程序。使用 mvnw 启动应用程序后,浏览器显示错误消息,指出前端应用程序不是 运行ning,请尝试单独启动它。日志中没有错误。

但是,当我尝试使用“npm start”命令单独启动前端应用程序时,出现以下错误,

> light-sail@0.0.1-SNAPSHOT webpack C:\personal\code\POC\LightSail
> node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "serve" "--config" "webpack/webpack.dev.js" "--inline" "--env" "stats=minimal"

[webpack-cli] Unable to load '@webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
    at WebpackCLI.makeCommand (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:173:21)
    at ServeCommand.apply (C:\personal\code\POC\LightSail\node_modules\@webpack-cli\serve\lib\index.js:41:19)
    at loadCommandByName (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:907:35)
    at async Command.<anonymous> (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:1462:17)
    at async Promise.all (index 0)
    at async WebpackCLI.run (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:1500:9)
    at async runCLI (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\bootstrap.js:11:9)

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail@0.0.1-SNAPSHOT webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "serve" "--config" "webpack/webpack.dev.js" "--inline" "--env" "stats=minimal"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail@0.0.1-SNAPSHOT webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs21-11-14T10_08_32_848Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail@0.0.1-SNAPSHOT webpack-dev-server: `npm run webpack -- serve "--config" "webpack/webpack.dev.js" "--inline" "--env" "stats=minimal"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail@0.0.1-SNAPSHOT webpack-dev-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs21-11-14T10_08_32_877Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail@0.0.1-SNAPSHOT webapp:dev: `npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --env stats=minimal`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail@0.0.1-SNAPSHOT webapp:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs21-11-14T10_08_32_918Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail@0.0.1-SNAPSHOT start: `npm run webapp:dev`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail@0.0.1-SNAPSHOT start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\admin\AppData\Roaming\npm-cache\_logs21-11-14T10_08_32_967Z-debug.log

package.json 有以下版本,

"webpack-cli": "4.7.2",

更新

安装的节点版本是 v14.17.5

有人能帮忙吗?

我使用的 jhipster 版本是 7.1.0。升级到 7.3.1 后一切正常。