Home > Blockchain >  not able to start frontend app of jhipster project
not able to start frontend app of jhipster project

Time:11-18

I created a jhipster project. But I am not able to run the application using mvnw command. after starting the app using mvnw the browser displays the error message that says the front end app is not running, try starting it separately. there's no error in the log.

However, when I tried starting the front end application alone with the "npm start" command I got the following error,

> 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\_logs\2021-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\_logs\2021-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\_logs\2021-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\_logs\2021-11-14T10_08_32_967Z-debug.log

the package.json has the following version,

"webpack-cli": "4.7.2",

UPDATE

installed node version is v14.17.5

can anyone help?

CodePudding user response:

the jhipster version I was using was 7.1.0. After upgrading it to 7.3.1 everything works fine.

  • Related