从源构建 ThingsBoard 时出错 - Thingsboard 服务器 UI 失败
Error Building ThingsBoard From Source - Thingsboard Server UI FAILURE
我想生成 Thingsboard 依赖项 jar,我想在我的应用程序中使用它从我的 java 应用程序调用 Thingsboard API。
要使用 Thingsboard 依赖 jar,我必须构建应用程序,因为这些 jar 在 public 存储库中不可用。
我正在尝试从源代码构建 ThingsBoard 应用程序,我正在按照中提到的说明进行操作
link - https://thingsboard.io/docs/user-guide/install/building-from-source/
我克隆了 ThingsBoard 报告,然后检查了 "release-1.4" b运行ch 和 运行 mvn clean install 命令。
应用程序构建失败,出现以下错误。
[INFO] Installing npm version 3.10.8
[INFO] Unpacking /var/root/.m2/repository/com/github/eirslett/npm/3.10.8/npm-3.10.8.tar.gz into /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.0:npm (npm install) @ ui ---
[INFO] Running 'npm install' in /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui
[WARNING] npm WARN deprecated angular-ui-router@0.3.2: This npm package 'angular-ui-router' has been renamed to '@uirouter/angularjs'. Please update your package.json. See https://ui-router.github.io/blog/uirouter-scoped-packages/
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! Darwin 16.7.0
[ERROR] npm ERR! argv "/Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node" "/Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node_modules/npm/bin/npm-cli.js" "install"
[ERROR] npm ERR! node v6.9.1
[ERROR] npm ERR! npm v3.10.8
[ERROR] npm ERR! code 128
[ERROR]
[ERROR] npm ERR! Command failed: git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489
[ERROR] npm ERR! Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489'...
[ERROR] npm ERR! fatal: unable to connect to github.com:
[ERROR] npm ERR! github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! github.com[1: 192.30.253.112]: errno=Operation timed out
---
---
[INFO] Thingsboard ........................................ SUCCESS [ 1.895 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [ 0.070 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [ 4.105 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [ 0.716 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [ 0.739 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [ 8.202 s]
[INFO] Thingsboard Server Extensions API .................. SUCCESS [ 1.109 s]
[INFO] Thingsboard Server Core Extensions ................. SUCCESS [ 4.167 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [ 0.054 s]
[INFO] Thingsboard Server RabbitMQ Extension .............. SUCCESS [ 1.810 s]
[INFO] Thingsboard Server REST API Call Extension ......... SUCCESS [ 0.704 s]
[INFO] Thingsboard Server Kafka Extension ................. SUCCESS [ 2.283 s]
[INFO] Thingsboard Server MQTT Extension .................. SUCCESS [ 0.536 s]
[INFO] Thingsboard Server SQS Extension ................... SUCCESS [ 3.292 s]
[INFO] Thingsboard Server SNS Extension ................... SUCCESS [ 1.418 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [ 0.028 s]
[INFO] Thingsboard HTTP Transport ......................... SUCCESS [ 0.511 s]
[INFO] Thingsboard COAP Transport ......................... SUCCESS [ 1.111 s]
[INFO] Thingsboard MQTT Transport ......................... SUCCESS [ 0.711 s]
[INFO] Thingsboard Server UI .............................. FAILURE [02:53 min]
[INFO] Thingsboard Server Tools ........................... SKIPPED
[INFO] ThingsBoard Server Application ..................... SKIPPED
非常感谢任何帮助。
根据您的日志,您显然在连接 github.com 时遇到了问题。也许是一些暂时的问题。尝试重建。如果没有 - 尝试清理 ui/node_modules 文件夹并再次重建。
我通过几个步骤解决了问题
1. Restart System, so that it can close if in use.
2. Open command prompt with admin previleges
3. Run mvn clean install -DskipTests
确保安装了 java 8 、maven 3.0 + & git。
如果仍然存在问题,则从系统中删除 node/npm 并重复所有要点。
我想生成 Thingsboard 依赖项 jar,我想在我的应用程序中使用它从我的 java 应用程序调用 Thingsboard API。
要使用 Thingsboard 依赖 jar,我必须构建应用程序,因为这些 jar 在 public 存储库中不可用。
我正在尝试从源代码构建 ThingsBoard 应用程序,我正在按照中提到的说明进行操作 link - https://thingsboard.io/docs/user-guide/install/building-from-source/
我克隆了 ThingsBoard 报告,然后检查了 "release-1.4" b运行ch 和 运行 mvn clean install 命令。
应用程序构建失败,出现以下错误。
[INFO] Installing npm version 3.10.8
[INFO] Unpacking /var/root/.m2/repository/com/github/eirslett/npm/3.10.8/npm-3.10.8.tar.gz into /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.0:npm (npm install) @ ui ---
[INFO] Running 'npm install' in /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui
[WARNING] npm WARN deprecated angular-ui-router@0.3.2: This npm package 'angular-ui-router' has been renamed to '@uirouter/angularjs'. Please update your package.json. See https://ui-router.github.io/blog/uirouter-scoped-packages/
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/thingsboard/flot.git /Users/admin/.npm/_git-remotes/git-github-com-thingsboard-flot-git-0-9-work-799e39f1: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/MichaelZinsmaier/CurvedLines.git /Users/admin/.npm/_git-remotes/git-github-com-MichaelZinsmaier-CurvedLines-git-master-843e4689: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268'...
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: fatal: unable to connect to github.com:
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/alenaksu/mdPickers.git /Users/admin/.npm/_git-remotes/git-github-com-alenaksu-mdPickers-git-0-7-5-ca6ad268: github.com[1: 192.30.253.112]: errno=Operation timed out
[ERROR] npm ERR! Darwin 16.7.0
[ERROR] npm ERR! argv "/Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node" "/Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node_modules/npm/bin/npm-cli.js" "install"
[ERROR] npm ERR! node v6.9.1
[ERROR] npm ERR! npm v3.10.8
[ERROR] npm ERR! code 128
[ERROR]
[ERROR] npm ERR! Command failed: git clone --template=/Users/admin/.npm/_git-remotes/_templates --mirror git://github.com/fabiobiondi/angular-fullscreen.git /Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489
[ERROR] npm ERR! Cloning into bare repository '/Users/admin/.npm/_git-remotes/git-github-com-fabiobiondi-angular-fullscreen-git-master-2346b489'...
[ERROR] npm ERR! fatal: unable to connect to github.com:
[ERROR] npm ERR! github.com[0: 192.30.253.113]: errno=Operation timed out
[ERROR] npm ERR! github.com[1: 192.30.253.112]: errno=Operation timed out
---
---
[INFO] Thingsboard ........................................ SUCCESS [ 1.895 s]
[INFO] Thingsboard Server Commons ......................... SUCCESS [ 0.070 s]
[INFO] Thingsboard Server Common Data ..................... SUCCESS [ 4.105 s]
[INFO] Thingsboard Server Common Messages ................. SUCCESS [ 0.716 s]
[INFO] Thingsboard Server Common Transport components ..... SUCCESS [ 0.739 s]
[INFO] Thingsboard Server DAO Layer ....................... SUCCESS [ 8.202 s]
[INFO] Thingsboard Server Extensions API .................. SUCCESS [ 1.109 s]
[INFO] Thingsboard Server Core Extensions ................. SUCCESS [ 4.167 s]
[INFO] Thingsboard Extensions ............................. SUCCESS [ 0.054 s]
[INFO] Thingsboard Server RabbitMQ Extension .............. SUCCESS [ 1.810 s]
[INFO] Thingsboard Server REST API Call Extension ......... SUCCESS [ 0.704 s]
[INFO] Thingsboard Server Kafka Extension ................. SUCCESS [ 2.283 s]
[INFO] Thingsboard Server MQTT Extension .................. SUCCESS [ 0.536 s]
[INFO] Thingsboard Server SQS Extension ................... SUCCESS [ 3.292 s]
[INFO] Thingsboard Server SNS Extension ................... SUCCESS [ 1.418 s]
[INFO] Thingsboard Server Transport Modules ............... SUCCESS [ 0.028 s]
[INFO] Thingsboard HTTP Transport ......................... SUCCESS [ 0.511 s]
[INFO] Thingsboard COAP Transport ......................... SUCCESS [ 1.111 s]
[INFO] Thingsboard MQTT Transport ......................... SUCCESS [ 0.711 s]
[INFO] Thingsboard Server UI .............................. FAILURE [02:53 min]
[INFO] Thingsboard Server Tools ........................... SKIPPED
[INFO] ThingsBoard Server Application ..................... SKIPPED
非常感谢任何帮助。
根据您的日志,您显然在连接 github.com 时遇到了问题。也许是一些暂时的问题。尝试重建。如果没有 - 尝试清理 ui/node_modules 文件夹并再次重建。
我通过几个步骤解决了问题
1. Restart System, so that it can close if in use.
2. Open command prompt with admin previleges
3. Run mvn clean install -DskipTests
确保安装了 java 8 、maven 3.0 + & git。 如果仍然存在问题,则从系统中删除 node/npm 并重复所有要点。