frontend-maven-plugin
frontend-maven-plugin copied to clipboard
yarnrc in user home
I spent today finding the cause of
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:yarn (yarn install) on project mywebapp: Failed to run task: 'yarn ' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
and this issue with line 218 of the parse.js https://github.com/yarnpkg/yarn/issues/613
With config
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.1</version>
<configuration>
<installDirectory>${git.dir.worktree}/target/apps</installDirectory>
<nodeVersion>v18.16.0</nodeVersion>
<yarnVersion>v1.22.19</yarnVersion>
<nodeDownloadRoot>https://rego/repository/nodejs.org_dist/</nodeDownloadRoot>
<yarnDownloadRoot>https://rego/repository/github.com_yarnpkg_yarn_releases_download/</yarnDownloadRoot>
<serverId>presto-public</serverId>
<skip>false</skip>
</configuration>
<executions>
<execution>
<id>install node and yarn</id>
<goals>
<goal>install-node-and-yarn</goal>
</goals>
</execution>
<execution>
<id>yarn install</id>
<goals>
<goal>yarn</goal>
</goals>
</execution>
<execution>
<id>yarn set proxy</id>
<goals>
<goal>yarn</goal>
</goals>
<configuration>
<arguments>config set httpProxy https://rego/repository/npmjs/</arguments>
</configuration>
</execution>
</executions>
</plugin>
It seems this file was to blame ~/.yarnrc.
It was probably corrupted after the machine lost power during a build.
After removing it I could rebuild.
Why is this file being written to the user home folder? That puts it out of control of the clean phase.