question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when building Thingsboard UI from source in Ubuntu

See original GitHub issue

Hi,

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/pngquant binary 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:closed
  • Created 4 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
techfriendlycommented, Aug 14, 2019

Hi all,

I finally checked required commands to build TB properly. I hope this helps other people with the same issue:

  1. sudo apt-get update
  2. sudo apt install openjdk-8-jdk
  3. sudo apt-get install libpng-dev
  4. sudo apt-get install maven
  5. sudo apt install nodejs
  6. sudo apt install npm
  7. git clone https://github.com/thingsboard/thingsboard.git
  8. cd thingsboard
  9. git checkout release-2.4
  10. sudo npm install -g pkg
  11. mvn clean install -DskipTests

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

1reaction
zbxzxxcommented, Sep 4, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building from sources | ThingsBoard Community Edition
This guide will help you to download and build ThingsBoard from sources. Instructions listed below are tested on Ubuntu 20.04 LTS and CentOS...
Read more >
TB installation failure on Ubuntu 16.04 (Build from source & As ...
Hello all, newbie here. I've tried to install Thingsboard on a laptop using Ubuntu 16.04 with Cassandra and Java Oracle 8.0 installed. First...
Read more >
Thingsboard Not building from Source - Stack Overflow
I have a new ubuntu 16.04 Virtual machine that I'm attempting to install thingsboard on using this documentation Contribution Guide and am ...
Read more >
thingsboard/chat - Gitter
I have successfully built Thingsboard from source and got the message Build Passed, However, unfortunately, the install.sh file fails and also the interface...
Read more >
Installing ThingsBoard CE on Ubuntu Server
Installing ThingsBoard CE on Ubuntu Server¶ · Step 1. Install Java 8 (OpenJDK)¶ · Step 2. ThingsBoard service installation¶ · Step 3. Configure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found