4

I am trying to build Ambari RPM from source code. After running this command I am getting error as stated below

mvn -B clean install rpm:rpm -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"

Error:

[WARNING] npm WARN package.json adminconsole@0.0.0 No description
[WARNING] npm WARN package.json adminconsole@0.0.0 No repository field.
[WARNING] npm WARN package.json adminconsole@0.0.0 No README data
[WARNING] npm WARN package.json adminconsole@0.0.0 No license field.
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:exec (Bower install) @ ambari-admin ---
bower                            error Unexpected token {

Stack trace:
SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-registry-client/node_modules/request/lib/cookies.js:3:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Console trace:
Trace
    at StandardRenderer.error (/root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/lib/renderers/StandardRenderer.js:72:17)
    at Logger.<anonymous> (/root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/bin/bower:111:22)
    at emitOne (events.js:77:13)
    at Logger.emit (events.js:169:7)
    at Logger.emit (/root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
    at /root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/lib/commands/index.js:40:20
    at _rejected (/root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/q/q.js:797:24)
    at /root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/q/q.js:823:30
    at Promise.when (/root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/q/q.js:1035:31)
    at Promise.promise.promiseDispatch (/root/apache-ambari-2.7.5-src/ambari-admin/src/main/resources/ui/admin-web/node_modules/bower/node_modules/q/q.js:741:41)

System info:
Bower version: 1.3.8
Node version: 4.5.0
OS: Linux 3.10.0-1062.el7.x86_64 x64
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Ambari Main 2.7.5.0.0 .............................. SUCCESS [  3.564 s]
[INFO] Apache Ambari Project POM 2.7.5.0.0 ................ SUCCESS [  0.182 s]
[INFO] Ambari Web 2.7.5.0.0 ............................... SUCCESS [ 59.879 s]
[INFO] Ambari Views 2.7.5.0.0 ............................. SUCCESS [  1.327 s]
[INFO] Ambari Admin View 2.7.5.0.0 ........................ FAILURE [  4.946 s]
[INFO] ambari-utility 1.0.0.0-SNAPSHOT .................... SKIPPED
[INFO] ambari-metrics 2.7.5.0.0 ........................... SKIPPED
[INFO] Ambari Metrics Common 2.7.5.0.0 .................... SKIPPED
[INFO] Ambari Metrics Hadoop Sink 2.7.5.0.0 ............... SKIPPED
[INFO] Ambari Metrics Flume Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Kafka Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Storm Sink 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Metrics Storm Sink (Legacy) 2.7.5.0.0 ....... SKIPPED
[INFO] Ambari Metrics Collector 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Metrics Monitor 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Grafana 2.7.5.0.0 ................... SKIPPED
[INFO] Ambari Metrics Host Aggregator 2.7.5.0.0 ........... SKIPPED
[INFO] Ambari Metrics Assembly 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Service Advisor 1.0.0.0-SNAPSHOT ............ SKIPPED
[INFO] Ambari Server 2.7.5.0.0 ............................ SKIPPED
[INFO] Ambari Functional Tests 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Agent 2.7.5.0.0 ............................. SKIPPED
[INFO] ambari-logsearch 2.7.5.0.0 ......................... SKIPPED
[INFO] Ambari Logsearch Appender 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Config Api 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Config JSON 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Solr 2.7.5.0.0 ............. SKIPPED
[INFO] Ambari Logsearch Config Zookeeper 2.7.5.0.0 ........ SKIPPED
[INFO] Ambari Logsearch Config Local 2.7.5.0.0 ............ SKIPPED
[INFO] Ambari Logsearch Log Feeder Plugin Api 2.7.5.0.0 ... SKIPPED
[INFO] Ambari Logsearch Log Feeder Container Registry 2.7.5.0.0 SKIPPED
[INFO] Ambari Logsearch Log Feeder 2.7.5.0.0 .............. SKIPPED
[INFO] Ambari Logsearch Web 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Logsearch Server 2.7.5.0.0 .................. SKIPPED
[INFO] Ambari Logsearch Assembly 2.7.5.0.0 ................ SKIPPED
[INFO] Ambari Logsearch Integration Test 2.7.5.0.0 ........ SKIPPED
[INFO] ambari-infra 2.7.5.0.0 ............................. SKIPPED
[INFO] Ambari Infra Solr Client 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Solr Plugin 2.7.5.0.0 ................. SKIPPED
[INFO] Ambari Infra Manager 2.7.5.0.0 ..................... SKIPPED
[INFO] Ambari Infra Assembly 2.7.5.0.0 .................... SKIPPED
[INFO] Ambari Infra Manager Integration Tests 2.7.5.0.0 ... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:10 min
[INFO] Finished at: 2020-05-07T05:14:37-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (Bower install) on project ambari-admin: Command execution failed. Process exited with an error: 1 (Exit value: 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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ambari-admin

pom.xml: pom.xml

So far I have tried to change the node version at this directory ambari-admin/src/main/resources/ui/admin-web/node by changing the node binary file

4
  • see this post: stackoverflow.com/questions/61542102/…. and read my comments... May 7, 2020 at 13:34
  • the steps I completed from the link I reference for x64 solution still fails with the same error you have above.. I am still trying to find solution. May 7, 2020 at 13:36
  • 1
    @steven-dfheinz I have found the solution. you have to change the version of node and npm in pom file which you will find in ambari-admin directory May 8, 2020 at 6:20
  • Nice one, thank you. May 8, 2020 at 14:02

2 Answers 2

11

I have found the solution just by changing the node and npm version in ambari-admin directory.

Before

 <configuration>
      <nodeVersion>v4.5.0</nodeVersion>
      <npmVersion>2.15.0</npmVersion>
      <workingDirectory>src/main/resources/ui/admin-web/</workingDirectory>
      <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
 </configuration>

After

  <configuration>
          <nodeVersion>v11.10.0</nodeVersion>
          <npmVersion>6.7.0</npmVersion>
          <workingDirectory>src/main/resources/ui/admin-web/</workingDirectory>
          <npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
   </configuration>
0

Besides the above, I fixed the version of the bower. Here the details https://github.com/apache/bigtop/pull/628/files

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.