- 在 IDEA 中进行
mvn clean install -Dmaven.test.skip=true
进行编译,在ui-ngx
模块报错。[INFO] -----------------------< org.thingsboard:ui-ngx >----------------------- [INFO] Building ThingsBoard Server UI 3.3.0 [1/15] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ui-ngx --- [INFO] Deleting D:\IDEA-workspace\iot\thingsboard\ui-ngx\target [INFO] [INFO] --- frontend-maven-plugin:1.12.0:install-node-and-yarn (install node and npm) @ ui-ngx --- [INFO] Installing node version v12.16.1 [INFO] Copying node binary from C:\Users\付康\.m2\repository\com\github\eirslett\node\12.16.1\node-12.16.1-win-x64.exe to D:\IDEA-workspace\iot\thingsboard\ui-ngx\target\node\node.exe [INFO] Installed node locally. [INFO] Installing Yarn version v1.22.4 [INFO] Unpacking C:\Users\付康\.m2\repository\com\github\eirslett\yarn\1.22.4\yarn-1.22.4.tar.gz into D:\IDEA-workspace\iot\thingsboard\ui-ngx\target\node\yarn [INFO] Installed Yarn locally. [INFO] [INFO] --- frontend-maven-plugin:1.12.0:yarn (yarn install) @ ui-ngx --- [INFO] Running 'yarn install' in D:\IDEA-workspace\iot\thingsboard\ui-ngx [INFO] yarn install v1.22.4 [INFO] warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [INFO] [1/4] Resolving packages... [INFO] [2/4] Fetching packages... [INFO] error Command failed. [INFO] error Command failed.info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. [INFO] Exit code: 128 [INFO] Command: git [INFO] Arguments: ls-remote --tags --heads git://github.com/thingsboard/flot.git [INFO] Directory: D:\IDEA-workspace\iot\thingsboard\ui-ngx [INFO] Output: [INFO] fatal: unable to connect to github.com: [INFO] github.com[0: 140.82.112.4]: errno=Unknown error
- 首先排查
github.com
域名解析,通过https://ipaddress.com/website/github.com
获取最新 ip 并写入 hosts 文件。【无效】 - 日志中出现
git://github.com/thingsboard/flot.git
,查看文件发现其中三个依赖组件是git://xxx.git
格式,经查资料已经被github
禁用了,需要转换为https://
执行失败:git config --global url."https://".insteadOf git://
去掉D:\IDEA-workspace\iot\thingsboard\ui-ngx>git config --global url."https://".insteadOf git:// Rename from 'C:/Users/abc/.gitconfig.lock' to 'C:/Users/abc/.gitconfig' failed. Should I try again? (y/n) y
--global
参数成功,或者手动编辑用户目录下的.gitconfig
文件,添加如下:[url "https://"] insteadOf = git://
- 再次执行,报新错误
Output: fatal: unable to access 'https://github.com/thingsboard/flot.git/': OpenSSL SSL_read: Connection was reset, errno 10054 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
- 设置不进行 https 验证
git config http.sslVerify "false"
- 再次执行
yarn install
即可D:\IDEA-workspace\iot\thingsboard\ui-ngx>yarn install yarn install v1.22.4 warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@2.3.2: The platform "win32" is incompatible with this module. info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.1.3: The platform "win32" is incompatible with this module. info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@1.2.13: The platform "win32" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... warning " > @material-ui/pickers@3.3.10" has unmet peer dependency "@date-io/core@^1.3.6". warning " > @ngrx/effects@10.1.2" has incorrect peer dependency "@angular/core@^10.0.0". ... [4/4] Building fresh packages... Done in 221.51s.
- 如果依旧失败,建议在 windows 中下载安装 nodejs 和 yarn 程序,在
ui-ngx
目录下命令行中执行yarn install
命令。
Thingsboard 编译前端 ui-ngx 踩坑记录
于 2022-06-10 11:09:13 首次发布