frontend-maven-plugin: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (yarn install)

Maven build is getting failed for the the plugin execution

Error:

[INFO] --- frontend-maven-plugin:1.6:yarn (yarn install) @ dhulai ---
[INFO] Running 'yarn install' in C:\codelab\a2z\dhulai
[ERROR] Access is denied.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.285 s
[INFO] Finished at: 2018-08-04T18:49:19+05:30
[INFO] Final Memory: 35M/396M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (yarn install) on project dhulai: Failed to run task: 'yarn install' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

What is the expected behavior? This should work perfectly as ran without plugin with only yarn install command

pom.xml ->

<plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend-maven-plugin.version}</version>
                        <executions>
                             <execution>
                                <id>yarn install</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>install</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>webpack build test</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <phase>test</phase>
                                <configuration>
                                    <arguments>run webpack:test</arguments>
                                    <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
                                </configuration>
                            </execution>
                            <execution>
                                <id>webpack build prod</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <phase>generate-resources</phase>
                                <configuration>
                                    <arguments>run webpack:prod</arguments>
                                    <yarnInheritsProxyConfigFromMaven>false</yarnInheritsProxyConfigFromMaven>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

Please mention your frontend-maven-plugin and operating system version.

frontend-maven-plugin : version : 1.6

java version “1.8.0_152” Java™ SE Runtime Environment (build 1.8.0_152-b16) Java HotSpot™ 64-Bit Server VM (build 25.152-b16, mixed mode)

git version 2.11.0.windows.1 node: v10.4.0 npm: 6.1.0 yeoman: 2.0.2 yarn: 1.9.4 OS : Windows 10 64 bit

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21

Most upvoted comments

Upgrading node version to v10.15.3 and using npm version 6.4.1 fixed the issue. I hope this helps

hi i have same version installed for node and npm ,but still facing the issue

Upgrading node version to v10.15.3 and using npm version 6.4.1 fixed the issue. I hope this helps

Still have this issue with nodejs v14.4.0

@searhiy Install nodejs in your environment. I had the same issue when building a docker image and I had to install nodejs to solve this

@akhatri - same issue with the same config. Has anyone made any progress on this?

I just add on pom.xml the same version of node and npm that I have on my laptop

I still have the same issue with nodejs 10.19.0

@akuma8 Updated nodejs from 8.11 to 8.12 and it resolved the issue. Thanks!

Beeing on v10.13.0 and still have the same issue (building inside docker image too)