Failing to deploy ui.frontend | Community
Skip to main content
krishna_garikapati
New Participant
December 30, 2023
Solved

Failing to deploy ui.frontend

  • December 30, 2023
  • 5 replies
  • 2928 views

When i am trying to deploy the repo into my local it failing at ui.frontend.

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run prod) on project xxxxxxxxxxxx.ui.frontend: Failed to run task: 'npm run prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run prod) on project xxxxxxxxxxxxx.ui.frontend: Failed to run task

Tried changing npm and node versions in pom
v16.17.0
8.15.0

and also followed

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/help-failed-to-execute-goal-com-github-eirslett-frontend-maven/td-p/567500

both didn't work.

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 krishna_garikapati

My bad.. i wasn't using the correct branch to deploy the code.
Switched to develop branch and deployed.

However if try to deploy using master. i still facing this issue and reported that to ACS team.
I'll keep the thread updated with the fix they made.

5 replies

krishna_garikapati
krishna_garikapatiAuthorAccepted solution
New Participant
January 13, 2024

My bad.. i wasn't using the correct branch to deploy the code.
Switched to develop branch and deployed.

However if try to deploy using master. i still facing this issue and reported that to ACS team.
I'll keep the thread updated with the fix they made.

krishna_garikapati
New Participant
January 19, 2024

The actual error which caused this issue was 

ERROR in ./src/main/webpack/site/main.scss [INFO] Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js): [INFO] ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): [INFO] [INFO] @include steps-style; [INFO] ^ [INFO] Undefined mixin. [INFO] â?· [INFO] 78 â?? @include steps-style; [INFO] â?? ^^^^^^^^^^^^^^^^^^^^ [INFO] â?µ [INFO] src\main\webpack\components\atoms\xxxxxx-steps\xxxxxx-steps.scss 78:5 @import


The file src\main\webpack\components\atoms\xxxxxx-steps\xxxx-steps.scss seems out of sync and caused the issue while deploying master.
Resyncing the file helped in fixing the issue.

@kautuk_sahni  FYI 

kautuk_sahni
Employee
January 22, 2024

Thank you for sharing this with the community. 

 

Kautuk Sahni
kautuk_sahni
Employee
January 2, 2024

@krishna_garikapati 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
krishna_garikapati
New Participant
January 2, 2024

Thanks for checking @kautuk_sahni 
I'm still struggling to resolve this and working with ACS team(Consulting). i'll post the solution here if we come across any.

pulkitvashisth
New Participant
January 2, 2024

You can try a few steps : 
Sometimes, npm cache corruption can cause issues. Try clearing the npm cache using:

-> npm cache clean --force
Or update npm packages
-> Update npm packages
Or
Look into the logs generated during the frontend build process. They might provide more specific details about the failure.

krishna_garikapati
New Participant
January 2, 2024

@pulkitvashisth Yes i did tried them already but no use.

The pom says
<requireMavenVersion>

<version>[3.3.9,)</version>

</requireMavenVersion>

<requireJavaVersion>

<message>Maven must be executed with a Java 8 JRE or higher.</message>

<version>1.8.0</version>


 <configuration>

<nodeVersion>v16.15.0</nodeVersion>

<npmVersion>8.5.5</npmVersion>

</configuration>


And my local is having little higher versions.
Apache Maven 3.8.3
Java version: 11.0.17
npm 8.5.5
Node v16.16.0

 

Is it mandate to have exact same version in local or ok to have a little higher version?

SureshDhulipudi
New Participant
January 2, 2024

can you try removing package-lock.json file and re run/

krishna_garikapati
New Participant
January 2, 2024

Yes, i tried that as part of initial troubleshoot but it didn't help.

aanchal-sikka
New Participant
December 31, 2023
Aanchal Sikka
krishna_garikapati
New Participant
December 31, 2023

tried but no use.
Also tried running the npm run prod specifically and it resulted bellow error.

Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema. - options[0] has an unknown property 'to'. These properties are valid: object { patterns, options? } - options[1] has an unknown property 'context'. These properties are valid: object { patterns, options? } ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.

  Fixed that by updating the webpack.prod.js.

however i am still getting the initial error if try to deploy the ui.frontend package