srs/gradle-node-plugin

Build fails with Gradle 7

sergey-morenets opened this issue ยท 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?

deepy commented

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 #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)

Hi @deepy

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

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

@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

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