cloud manager build fails when trying to run frontend module | Community
Skip to main content
Level 4
September 14, 2023
Solved

cloud manager build fails when trying to run frontend module

  • September 14, 2023
  • 2 replies
  • 1706 views

Hey All, 

 

anyone has any idea why the node module fails to run in cloud manager. it runs fine in local. i tried the same commands that cloud manager uses and it worked in local. here is the screenshot.

 i used the link here to follow and run the commands in local and it works fine - https://github.com/cqsupport/cloud-manager/blob/main/cm-build-step-fails.md 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by A_H_M_Imrul

yes, runs successfully locally all the time. failing in cloud manager always.


Hello @surajpatra2525,

 

I see both the command install node and npm and npm install getting skipped in the log. Is that the same for local build as well?  Can you check if are you using the same node version mentioned in the pom.xml for development locally? Can you also add --no-cache with npm install and see what happens?

 

  

2 replies

A_H_M_Imrul
Community Advisor
Community Advisor
September 14, 2023

Hello @surajpatra2525,

 

Can you please share more information about error that you are getting?

 

Thanks..

Level 4
September 14, 2023

here is log i copied from the pipeline run - 
12:51:35,056 [main] [INFO] -----------------------< test:test.frontend >-----------------------
12:51:35,069 [main] [INFO] Building test - Frontend 1.0-SNAPSHOT [3/13]
12:51:35,079 [main] [INFO] --------------------------------[ pom ]---------------------------------
12:51:35,142 [main] [INFO]
12:51:35,145 [main] [INFO] --- jacoco-maven-plugin:0.8.10:prepare-agent (default-cli) @ Meijer.frontend ---
12:51:35,168 [main] [INFO] argLine set to -javaagent:/root/.m2/repository/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10-runtime.jar=destfile=/build_root/build/test/frontend/target/jacoco.exec
12:51:35,169 [main] [INFO]
12:51:35,182 [main] [INFO] --- maven-enforcer-plugin:3.3.0:enforce (enforce-maven) @ Meijer.frontend ---
12:51:35,197 [main] [INFO]
12:51:35,198 [main] [INFO] --- maven-toolchains-plugin:1.1:toolchain (default) @ Meijer.frontend ---
12:51:35,200 [main] [INFO] Required toolchain: jdk [ vendor='oracle' version='1.11' ]
12:51:35,200 [main] [INFO] Found matching toolchain for type jdk: JDK[/usr/lib/jvm/jdk-11.0.2]
12:51:35,200 [main] [INFO]
12:51:35,201 [main] [INFO] --- frontend-maven-plugin:1.12.1:install-node-and-pnpm (install node and npm) @ Meijer.frontend ---
12:51:35,268 [main] [INFO] Skipping execution.
12:51:35,269 [main] [INFO]
12:51:35,270 [main] [INFO] --- frontend-maven-plugin:1.12.1:pnpm (npm install) @ Meijer.frontend ---
12:51:35,276 [main] [INFO] Skipping execution.
12:51:35,276 [main] [INFO]
12:51:35,277 [main] [INFO] --- frontend-maven-plugin:1.12.1:pnpm (npm run test) @ Meijer.frontend ---
12:51:35,293 [main] [INFO] Running 'pnpm test:maven' in /build_root/build/test/frontend
12:51:35,309 [main] [INFO] ------------------------------------------------------------------------
12:51:35,309 [main] [INFO] Reactor Summary for test 1.0-SNAPSHOT:
12:51:35,310 [main] [INFO]
12:51:35,311 [main] [INFO] test ............................................. SUCCESS [ 2.484 s]
12:51:35,312 [main] [INFO] test - Core ...................................... SUCCESS [01:56 min]
12:51:35,312 [main] [INFO] test - Frontend .................................. FAILURE [ 0.255 s]

12:51:35,319 [main] [INFO] ------------------------------------------------------------------------
12:51:35,319 [main] [INFO] BUILD FAILURE
12:51:35,320 [main] [INFO] ------------------------------------------------------------------------
12:51:35,321 [main] [INFO] Total time: 02:03 min
12:51:35,323 [main] [INFO] Finished at: 2023-09-14T12:51:35Z
12:51:35,324 [main] [INFO] ------------------------------------------------------------------------
12:51:35,327 [main] [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:pnpm (npm run test) on project test.frontend: Failed to run task: 'pnpm test:maven' failed. java.io.IOException: Cannot run program "/build_root/build/test/frontend/node/node" (in directory "/build_root/build/test/frontend"): error=2, No such file or directory -> [Help 1]
12:51:35,335 [main] [ERROR]
12:51:35,336 [main] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
12:51:35,337 [main] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
12:51:35,338 [main] [ERROR]
12:51:35,340 [main] [ERROR] For more information about the errors and possible solutions, please read the following articles:
12:51:35,342 [main] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

A_H_M_Imrul
Community Advisor
Community Advisor
September 14, 2023

Hello @surajpatra2525,

 

It looks like something to do with the node version and dependencies. Is that intermittent? Is that running successfully locally?

 

Thanks 

kautuk_sahni
Community Manager
Community Manager
September 18, 2023

@surajpatra2525 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni