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

01/09 11:52
阅读数 2K

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]

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

<plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>1.6</version>
    <configuration>
        <workingDirectory>${project.build.directory}</workingDirectory>
    </configuration>
    <executions>
        <execution>
            <phase>prepare-package</phase>
            <id>install node and npm</id>
            <goals>
                <goal>install-node-and-npm</goal>
            </goals>
            <configuration>
                <nodeVersion>v8.12.0</nodeVersion>
                <npmVersion>6.4.1</npmVersion>
            </configuration>
        </execution>
        <execution>
            <phase>prepare-package</phase>
            <id>npm install</id>
            <goals>
                <goal>npm</goal>
            </goals>
            <configuration>
                <arguments>install</arguments>
            </configuration>
        </execution>
    </executions>
</plugin>
执行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]

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

<plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>1.6</version>
    <configuration>
        <workingDirectory>target</workingDirectory>
    </configuration>
    <executions>
        <execution>
            <phase>prepare-package</phase>
            <id>install node and npm</id>
            <goals>
                <goal>install-node-and-npm</goal>
            </goals>
            <configuration>
                <nodeVersion>v8.12.0</nodeVersion>
                <npmVersion>6.4.1</npmVersion>
                <nodeDownloadRoot>https://npm.taobao.org/mirrors/node/</nodeDownloadRoot>
                <npmDownloadRoot>https://registry.npm.taobao.org/npm/-/</npmDownloadRoot>

            </configuration>
        </execution>
        <execution>
            <phase>prepare-package</phase>





















            <id>npm install</id>
            <goals>
                <goal>npm</goal>
            </goals>
            <configuration>
                <arguments>install</arguments>
            </configuration>
        </execution>
    </executions>
</plugin>









mvn clean package

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

 

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部