Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm (install node and npm) on project dubbo-admin-frontend: Could not extract the Node archive: Could not extract archive: '/root/.m2/repository/com/github/eirslett/node/9.11.1/node-9.11.1-linux-x64.tar.gz': EOFException -> [Help 1]
Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm_第1张图片

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm_第2张图片

mvn package 打包失败

然后在dubbo-admin中的pom.xml(参考https://blog.csdn.net/bugzeroman/article/details/83113730?utm_medium=distribute.pc_relevant.none-task-blog-searchFromBaidu-7.not_use_machine_learn_pai&depth_1-utm_source=distribute.pc_relevant.none-task-blog-searchFromBaidu-7.not_use_machine_learn_pai)


    com.github.eirslett
    frontend-maven-plugin
    1.6
   
        ${project.build.directory}
   

   
       
            prepare-package
            install node and npm
           
                install-node-and-npm
           

           
                v8.12.0
                6.4.1
           

       

       
            prepare-package
            npm install
           
                npm
           

           
                install
           

       

   


执行mvn clean package 竟然还报错

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm install) on project dubbo-admin-frontend: Failed to run task: 'npm install' failed. java.io.IOException: /root/haoke/incubator-dubbo-ops/dubbo-admin-frontend/target doesn't exist. -> [Help 1]

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm_第3张图片

这个问题真是浪费了我好多时间,因为dubbo-admin-frontend中pom.xml让我添加到了dubbo-admin里面的pom.xml所以一直报上面的错误。应该在dubbo-admin-frontend中的pom.xml添加


    com.github.eirslett
    frontend-maven-plugin
    1.6
   
        target
   

   
       
            prepare-package
            install node and npm
           
                install-node-and-npm
           

           
                v8.12.0
                6.4.1
                https://npm.taobao.org/mirrors/node/
                https://registry.npm.taobao.org/npm/-/

           

       

       
            prepare-package


            npm install
           
                npm
           

           
                install
           

       
   

mvn clean package

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm_第4张图片

mvn --projects dubbo-admin-backend spring-boot:run 

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:install-node-and-npm_第5张图片

 

你可能感兴趣的:(question)