Error when building Thingsboard UI from source in Ubuntu
See original GitHub issueHi,
I’ve been trying to build Thingsboard versions 2.2.0, 2.3.1 or 2.4.0 on Ubuntu 18.04 (also tested Debian or CentOS) but I get a failure when building Thingsboard Server UI.
I saw in several posts that this is a common issue(even in early versions). I tried to test all potential solutions but nothing worked.
Does anybody knows what is failing and what the solution is?
Please take a look at the log below, but it is similar to others posted.
Thanks in advance!
[INFO] -------------------------< org.thingsboard:ui >------------------------- [INFO] Building Thingsboard Server UI 2.2.0 [20/32] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] — maven-clean-plugin:2.5:clean (default-clean) @ ui — [INFO] [INFO] — frontend-maven-plugin:1.0:install-node-and-npm (install node and npm) @ ui — [INFO] Installing node version v6.9.1 [INFO] Unpacking /home/ubuntu/.m2/repository/com/github/eirslett/node/6.9.1/node-6.9.1-linux-x64.tar.gz into /home/ubuntu/thingsboard-2.2/ui/target/node/tmp [INFO] Copying node binary from /home/ubuntu/thingsboard-2.2/ui/target/node/tmp/node-v6.9.1-linux-x64/bin/node to /home/ubuntu/thingsboard-2.2/ui/target/node/node [INFO] Installed node locally. [INFO] Installing npm version 6.4.1 [INFO] Unpacking /home/ubuntu/.m2/repository/com/github/eirslett/npm/6.4.1/npm-6.4.1.tar.gz into /home/ubuntu/thingsboard-2.2/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 /home/ubuntu/thingsboard-2.2/ui [INFO] [INFO] > node-sass@4.10.0 install /home/ubuntu/thingsboard-2.2/ui/node_modules/node-sass [INFO] > node scripts/install.js [INFO] [INFO] Cached binary found at /home/ubuntu/.npm/node-sass/4.10.0/linux-x64-48_binding.node [INFO] [INFO] > gifsicle@3.0.4 postinstall /home/ubuntu/thingsboard-2.2/ui/node_modules/gifsicle [INFO] > node lib/install.js [INFO] [ERROR] ✔ gifsicle pre-build test passed successfully [INFO] [INFO] > jpegtran-bin@3.2.0 postinstall /home/ubuntu/thingsboard-2.2/ui/node_modules/jpegtran-bin [INFO] > node lib/install.js [INFO] [ERROR] ✔ jpegtran pre-build test passed successfully [INFO] [INFO] > optipng-bin@3.1.4 postinstall /home/ubuntu/thingsboard-2.2/ui/node_modules/optipng-bin [INFO] > node lib/install.js [INFO] [ERROR] ✔ optipng pre-build test passed successfully [INFO] [INFO] > pngquant-bin@4.0.0 postinstall /home/ubuntu/thingsboard-2.2/ui/node_modules/pngquant-bin [INFO] > node lib/install.js [INFO] [ERROR] ⚠ The
/home/ubuntu/thingsboard-2.2/ui/node_modules/pngquant-bin/vendor/pngquantbinary doesn’t seem to work correctly [ERROR] ⚠ pngquant pre-build test failed [ERROR] ℹ compiling from source [ERROR] ✔ pngquant pre-build test passed successfully [ERROR] ✖ Error: pngquant failed to build, make sure that libpng-dev is installed [ERROR] at Promise.all.then.arr (/home/ubuntu/thingsboard-2.2/ui/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11) [ERROR] at process._tickCallback (internal/process/next_tick.js:103:7) [WARNING] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents): [WARNING] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”}) [ERROR] [ERROR] npm ERR! code ELIFECYCLE [ERROR] npm ERR! errno 1 [ERROR] npm ERR! pngquant-bin@4.0.0 postinstall:node lib/install.js[ERROR] npm ERR! Exit status 1 [ERROR] npm ERR! [ERROR] npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script. [ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above. [ERROR] [ERROR] npm ERR! A complete log of this run can be found in: [ERROR] npm ERR! /home/ubuntu/.npm/_logs/2019-08-12T21_33_19_792Z-debug.log [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Thingsboard 2.2.0: [INFO] [INFO] Thingsboard … SUCCESS [ 1.843 s] [INFO] Netty MQTT Client … SUCCESS [ 5.039 s] [INFO] Thingsboard Server Commons … SUCCESS [ 0.088 s] [INFO] Thingsboard Server Common Data … SUCCESS [ 5.908 s] [INFO] Thingsboard Server Common Messages … SUCCESS [ 2.948 s] [INFO] Thingsboard Server Queue components … SUCCESS [ 1.363 s] [INFO] Thingsboard Server Commons … SUCCESS [ 0.041 s] [INFO] Thingsboard Server Common Transport components … SUCCESS [ 8.649 s] [INFO] Thingsboard MQTT Transport Common … SUCCESS [ 1.570 s] [INFO] Thingsboard HTTP Transport Common … SUCCESS [ 0.555 s] [INFO] Thingsboard CoAP Transport Common … SUCCESS [ 0.735 s] [INFO] Thingsboard Server DAO Layer … SUCCESS [ 11.878 s] [INFO] Thingsboard Extensions … SUCCESS [ 0.058 s] [INFO] Thingsboard Rule Engine API … SUCCESS [ 0.847 s] [INFO] Thingsboard Rule Engine Components … SUCCESS [ 5.882 s] [INFO] Thingsboard Server Transport Modules … SUCCESS [ 0.044 s] [INFO] Thingsboard HTTP Transport Service … SUCCESS [ 8.993 s] [INFO] Thingsboard MQTT Transport Service … SUCCESS [ 7.171 s] [INFO] Thingsboard CoAP Transport Service … SUCCESS [ 6.238 s] [INFO] Thingsboard Server UI … FAILURE [01:07 min] [INFO] Thingsboard Server Tools … SKIPPED [INFO] ThingsBoard Server Application … SKIPPED [INFO] ThingsBoard Microservices … SKIPPED [INFO] ThingsBoard Docker Images … SKIPPED [INFO] ThingsBoard JavaScript Executor Microservice … SKIPPED [INFO] ThingsBoard Web UI Microservice … SKIPPED [INFO] ThingsBoard Node Microservice … SKIPPED [INFO] ThingsBoard Transport Microservices … SKIPPED [INFO] ThingsBoard MQTT Transport Microservice … SKIPPED [INFO] ThingsBoard HTTP Transport Microservice … SKIPPED [INFO] ThingsBoard COAP Transport Microservice … SKIPPED [INFO] ThingsBoard Black Box Tests … SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:19 min [INFO] Finished at: 2019-08-12T21:33:19Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.0:npm (npm install) on project ui: Failed to run task: ‘npm install’ failed. (error code 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 <goals> -rf :ui
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (1 by maintainers)

Top Related StackOverflow Question
Hi all,
I finally checked required commands to build TB properly. I hope this helps other people with the same issue:
On the other side, please be aware that I tested it in an UBUNTU 18,04 LTS AMI image of AWS on a t3a.medium machine (a t3a.small collapses… maybe due to having only 2Gb of RAM).
Thanks for your help
os:ubuntu 16
the same as i 1.i find i haved change the npm source , i use https://registry.npm.taobao.org/ u can check your registry npm config get registry then i use commond npm config set registry https://registry.npmjs.org/ to change my registry to default registry then i entey directry thingsboard/ui rm -rf node_modules/*/.git/ then it works. wish help u