siouan / frontend-gradle-plugin

All-in-one Gradle Node/NPM/PNPM/Yarn plugin to build, test, deploy Javascript applications using a Corepack-enabled package manager.
https://siouan.github.io/frontend-gradle-plugin/
Apache License 2.0
158 stars 23 forks source link

Unable to build frontend #235

Closed AahzBrut closed 4 months ago

AahzBrut commented 4 months ago

Before creating an issue, please:

  • Check you are using the latest plugin release.
  • Check the issue was not reported yet.

Hi,

While trying to execute installFrontend i am getting error: Caused by: java.lang.NoSuchMethodError: 'org.apache.commons.compress.archivers.zip.ZipFile$Builder org.apache.commons.compress.archivers.zip.ZipFile.builder()'

What I am trying to do: trying to run installFrontend Expected results: build success Actual results: build failure due to error

Environment

Settings in build.gradle[.kts] file:

frontend {
    nodeVersion.set("18.20.0")
    assembleScript.set("run build")
    cleanScript.set("run clean")
    checkScript.set("run check")
    verboseModeEnabled.set(true)
}

Attachments

v1nc3n4 commented 4 months ago

Hi @AahzBrut,

Thank you for using this plugin. The Apache Commons Compress dependency is used to explode Node.js distributions. The error suggests a method in this dependency does not exist, which sounds weird. Such issue is generally due to a conflict in the project, where this dependency is implicitly imported by another plugin/dependency with a version number significantly different.

What you can do:

Let me know the result here. BR

v1nc3n4 commented 4 months ago

Note that I am not sure about the second point. I suggest also some interesting sections in Gradle documentation:

I hope this helps.

AahzBrut commented 4 months ago

Thanks a lot for reply, yep, the culprit was apache avro

v1nc3n4 commented 4 months ago

Great! If you can provide a minimal sample project here so as I can reproduce the issue, that may help me identify improvements in the source code or the in the documentation. BR