question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

com.github.eirslett:frontend-maven-plugin:1.3:webpack (webpack build) on project blog: Failed to run task

See original GitHub issue

Hi. I am getting this error executing an application with Maven.

What should I do? Thanks in advance

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:webpack (webpack build) on project blog: Failed to run task: 'webpack.js --config webpack/webpack.dev.js' failed. (error code 2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:webpack (webpack build) on project blog: Failed to run task
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:352)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:197)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
        at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
        at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task
        at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:95)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 31 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'webpack.js --config webpack/webpack.dev.js' failed. (error code 2)
        at com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:60)
        at com.github.eirslett.maven.plugins.frontend.mojo.WebpackMojo.execute(WebpackMojo.java:64)
        at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
        ... 33 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:19 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
jlarroquecommented, Jan 29, 2018

Running mvn clean install indeed helps, as suggested by nahuelvr. I detected that the files package.json and webpack.config.js should be created, otherwise won’t be frontend at all. Too bad that the tutorial doesnt’t mention it.

2reactions
ns-brunocommented, Feb 28, 2019

in my case resolved by adding the property below in the file packege.json

"devDependencies": {
    "webpack": "^4.29.6"
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to run task: 'npm run webpack:build' #9865 - GitHub
Overview of the issue After running jhipster cli, and then attempting to successfully run ./mvnw, the maven command fails.
Read more >
when building my angular cli project with maven im ... - GitHub
i ran mvn clean install on my project and this is the error that is ... run build) on project adminconsole: Failed to...
Read more >
Angular Prod Webpack Build Failing v4.14.0 #7187 - GitHub
Overview of the issue Originally reported in gitter. The production webpack build started failing sometime recently (maybe last 24 hours?)
Read more >
webpack fails on npm run start · Issue #190 - GitHub
js' file I get this error. modules@google\dscc-scripts\build\viz\util.js:100 throw util_1.invalidVizConfig( components[${idx}].
Read more >
Webpack client does not throw error code when build failed
I would like to be able to set an initial loader for single-run compile that catches any errors from the subsequent loaders, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found