I tried the following to build metatron-discovery on Ubuntu 16.04:
1) Installing maven
2) Installing nodejs
3) Install npm
4) clone the git repository
5) cd into the appropriate folder via metatron-discovery
$ mvn clean install -DskipTests
“Failed to run task: ‘npm run prod’ failed.
Can you get some helpful advice?
Ubuntu’s OOM-Killer could kill npm process without any cautions and I suggest two options as follows :
1. You can configure proper memory option (using max_old_space_size)
2. Simply download our binary without build
Building ‘Metatron discovery’ requires Maven and NPM(node package mgmt.), so rarely affected by personal environment.
This means that we could only suggest about common issue when build modern applications.
We are using npm –prod option for frontend application, this process do optimize apps and many other things so its memory usage is very high.
It could be the reason of the build error, and you can see more details in your OS logs.
In Ubuntu case I suggest using ‘dmesg’ command and check OOM-Killer’s log.
Anyway, to resolve this memory issue
you’ll need to configure NPM to use proper memory for your environment.
Usually this option is configured by “max_old_space_size”, and you can configure it into ‘discovery-frontend/package.json’ file at our application.
If you’re not familiar with or sick of this situation, you can download binary file at our website.
Then you don’t need to build it and only thing to do is type ‘bin/metatron –init start’!