Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6

Avatar

Level 3

Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm dependency build) on project wcax-core.ui.apps: Failed to run task: 'npm run build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

 

1.I had installed the latest version of Node JS but getting the above error on maven build.

Could anyone please help me resolve this issue.

2 Replies

Avatar

Community Advisor

Hi @Keerthi97 

When you mean you had installed latest version of Node JS are you trying to use global nodejs version.Usually maven front end plugin will try to install a version of node and npm as part of goal node and npm install.

 

Did you tried cleaning up the node modules and re running mvn. Please post the complete error as well as your pom setup.

Regards,

Rajashankar.R

 

Avatar

Level 3

Hi @RajaShankar ,

 

Thanks for your response.

I am using the node version -16.14.2 and npm-8.5.0

 

I had cleaned the node modules in ui.apps and ui.frontend but still the build fail happens.

BUILD ERROR:

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (npm dependency build) on project wcax-core.ui.apps: Failed to run task: 'npm run build' failed. org.apache.commons.exec.ExecuteException: 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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

 

 

POM.xml(ui.apps)
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<nodeVersion>v14.18.1</nodeVersion>
<npmVersion>6.14.15</npmVersion>
</configuration>
</execution>
<execution>
<id>npm dependency install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>gulp build project-emsm-package</id>
<goals>
<goal>gulp</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install-project-emsm-package</arguments>
</configuration>
</execution>
<execution>
<id>npm dependency build</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<execution>
<id>npm dependency test</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>run test</arguments>
</configuration>
</execution>
<execution>
<id>gulp build project-theme-builder</id>
<goals>
<goal>gulp</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install-project-theme-package</arguments>
</configuration>