gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

Build fails with Gradle 7

Open sergey-morenets opened this issue 3 years ago • 5 comments

Hi

I'm using the latest version of this plugin:

plugins { id "com.moowork.node" version "1.3.1" }

After I've upgraded from Gradle 6.8.3 to Gradle 7 my project fails to build due to the error:


A problem was found with the configuration of task ':my-project:yarnSetup' (type 'YarnSetupTask').
  - Type 'YarnSetupTask' property 'args' is missing an input or output annotation.

    Reason: A property without annotation isn't considered during up-to-date checking.

    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.

    Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.

How can I fix it?

sergey-morenets avatar Apr 28 '21 08:04 sergey-morenets

It's kinda amazing that you were able to use it on Gradle 6 as the latest version supported is Gradle 5, you can see https://github.com/srs/gradle-node-plugin/issues/315 for the background, but the short of it is that this plugin is no longer maintained, there's however a fork available at https://github.com/node-gradle/gradle-node-plugin which is supported (and supports Gradle 6+ and configuration cache as well)

deepy avatar Apr 28 '21 15:04 deepy

Hi @deepy

Thank you for your efforts. I've already migrated to new plugin.

sergey-morenets avatar Apr 28 '21 15:04 sergey-morenets

@sergey-morenets what plugin did you migrate too? more users may mean it will last longer.

deanhiller avatar Feb 12 '22 20:02 deanhiller

@sergey-morenets what plugin did you migrate too? more users may mean it will last longer.

I've migrated to this one per @deepy advice: https://github.com/node-gradle/gradle-node-plugin

sergey-morenets avatar Feb 12 '22 21:02 sergey-morenets

In the node{} configuration I deleted the line npm and it worked for me. // Version of npm to use. npmVersion = '8.1.3'

for info, my node version = '17.1.0' I had been configuring according to https://github.com/srs/gradle-node-plugin/blob/master/docs/node.md remaining at your disposal

vifeng avatar Aug 18 '22 15:08 vifeng