运行 任务失败:'bower --allow-root install' 失败

Failed to run task: 'bower --allow-root install' failed

我正在尝试从源代码构建 Apache zeppelin。但它在 "zeppelin-web" 处中断并出现以下错误

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:bower (bower install) on project zeppelin-web: Failed to run task: 'bower --allow-root install' failed. (error code 8) -> [Help 1]

这是完整的调试日志。

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:bower (bower install) on project zeppelin-web: Failed to run task: 'bower --allow-root install' failed. (error code 8) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:bower (bower install) on project zeppelin-web: 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.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:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        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:497)
        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)
Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task
        at com.github.eirslett.maven.plugins.frontend.mojo.BowerMojo.execute(BowerMojo.java:41)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more
Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'bower --allow-root install' failed. (error code 8)
        at com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:38)
        at com.github.eirslett.maven.plugins.frontend.mojo.BowerMojo.execute(BowerMojo.java:39)
        ... 22 more
[ERROR] 
[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

我在网上找到并尝试了这些解决方案,但都无法解决问题。

Apache zeppelin build process failure in zeppelin-web with bower http://madhukaudantha.blogspot.com/2015/04/building-zeppelin-in-windows-8.html

这是 apache zeppelin master 分支的问题。现在已经整改了。只需获取最新的 master 分支并尝试构建它

我在这里遇到了同样的问题,对于那些遇到同样错误的人,这个答案只是一个指南: Maven 输出与您的类似:

[错误] 无法执行目标 com.github.eirslett:frontend-maven-plugin:0.0.25:bower (bower install) 在项目 zeppelin-web 上:无法 运行 任务:'bower --allow-root install' 失败。 (错误代码 1)-> [帮助 1]

但向上一点点显示:

[错误] bower ECONFLICT 无法为 angular

找到合适的版本

这意味着 bower 已执行,但它无法在一些可用的 angular 版本之间进行选择。 为了解决这个问题,我去了 /zeppeling-root-folder/zeppelin-web 并执行

./bower install

在 bower 安装结束时,它要求我在可用的 angular 版本之一之间进行选择,我选择 1.5.0,然后 运行 一个

npm install node-gyp@latest