idea编译thingsboard报错yarn (yarn install) on project ui-ngx: Failed to run task: ‘yarn install‘ failed.

问题描述

编译thingsboard源码,在编译ui-ngx模块时编译失败

报错信息如下:

[INFO] ThingsBoard Server UI .............................. FAILURE [ 20.104 s]
[INFO] Thingsboard Server Tools ........................... SKIPPED
[INFO] Thingsboard Rest Client ............................ SKIPPED
[INFO] ThingsBoard Server Application ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:06 min
[INFO] Finished at: 2023-05-05T17:11:34+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:yarn (yarn install) on project ui-ngx: Failed to run task: 'yarn install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ui-ngx
PS D:\Code\iot-thingsboard-master> 

在这里插入图片描述
在这里插入图片描述


原因分析:

可能是版本不匹配或者依赖问题


解决方案:

  1. 检查ui-ngx 下pom的nodejs和yarn版本,确保本地环境版本号与配置一致。在这里插入图片描述
    在这里插入图片描述

  2. 如果上述问题排除,在ui-ngx目录下起一个命令行 运行yarn install命令,如果没有问题,则删除maven repository后找个网络好的环境重新导入依赖并编译
    在这里插入图片描述


最后

本人重新导入依赖后
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值