HELP !!! Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run prod) on project aem-guides-wknd.ui.frontend: Failed to run task: 'npm run prod | Community
Skip to main content
January 13, 2023
Solved

HELP !!! Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run prod) on project aem-guides-wknd.ui.frontend: Failed to run task: 'npm run prod

  • January 13, 2023
  • 4 replies
  • 14367 views

Hi,

I know there are similar issues already out there for this but none of them worked for me.  I'm using MacOS I have node version 10.15.1 and npm version 6.4.1 which I replaced in the parent pom.  After going through all the other threads I'm still stuck.  I'm not sure why this build has to be this complex and riddled with pain points.   (sorry for the vent)

Any help with this would be appreciated.

Here's the error....
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.0:npm (npm run prod) on project aem-guides-wknd.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]
[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 <args> -rf :aem-guides-wknd.ui.frontend

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 Nirmal_Jose

Hi @gdeacon ,

 

I recently came across this error on my M1 macbook for a fresh code generated archetype 36 and 37 and was able to replicat the error. This is no more replicated if you are using archetype 40.

 

Steps to fix

1. Go to ui.frontend > package.json

2. Update "typescript": "^3.3.3333", to "typescript": "^4.8.2",

3. Delete the package-lock.json file.

 

Hope this helps

4. Run mvn clean install build on ui.frontend folder

4 replies

Kiran_Vedantam
Community Advisor
Community Advisor
January 13, 2023

Hi @gdeacon 

 

Try the solutions mentioned in : https://github.com/thingsboard/thingsboard/issues/1335

 

Just we need to change the "typescript": "^3.3.3333", to "typescript": "^4.8.2", in UI.frontend, package.json file. the problem solves.

 

Hope this helps!

 

Thanks,

Kiran Vedatntam.

gdeaconAuthor
January 17, 2023

Hi Kiran,

I tried your suggestion now I get a slightly different error see below it a different exit code no longer 1 now it's 2 LOL

 

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.2:npm (npm run prod) on project aem-guides-wknd.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.11.2:npm (npm run prod) on project aem-guides-wknd.ui.frontend: Failed to run task

Manu_Mathew_
Community Advisor
Community Advisor
January 14, 2023
Umesh_Thakur
Community Advisor
Community Advisor
January 14, 2023

Most probably you are using mac with ARM processor right?

if Yes please try to use below build plugin in ui.frontend

 

<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.11.0</version>
 
Hope this helps
Umesh Thakur

 

gdeaconAuthor
January 17, 2023

Hi Umesh,

Thanks for your help.

 

I tried your suggestion now I get a slightly different error see below it a different exit code no longer 1 now it's 2 LOL

My system is using

 Model Name: MacBook Pro

  Chip: Apple M1 Pro

  Total Number of Cores: 10 (8 performance and 2 efficiency)

  Memory: 32 GB

 

Any other ideeas?

 

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.2:npm (npm run prod) on project aem-guides-wknd.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.11.2:npm (npm run prod) on project aem-guides-wknd.ui.frontend: Failed to run task

Nirmal_Jose
Adobe Employee
Nirmal_JoseAdobe EmployeeAccepted solution
Adobe Employee
March 2, 2023

Hi @gdeacon ,

 

I recently came across this error on my M1 macbook for a fresh code generated archetype 36 and 37 and was able to replicat the error. This is no more replicated if you are using archetype 40.

 

Steps to fix

1. Go to ui.frontend > package.json

2. Update "typescript": "^3.3.3333", to "typescript": "^4.8.2",

3. Delete the package-lock.json file.

 

Hope this helps

4. Run mvn clean install build on ui.frontend folder