Com.moowork.node is throwing error

com.moowork.node is throwing error when i execute ./gradlew build and not sure why. I am using latest versions of node, npm and using Java11 due to Jenkins compatibility.

Tried mulitple scenarios which are suggested in Internet but no resolution to this problem. Kindly suggest the fix.

Error Info
-----------
srikanth@srikanth-N501VW:~/practice/cicd-pipeline-train-schedule-jenkins$ ./gradlew clean build

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/home/srikanth/practice/cicd-pipeline-train-schedule-jenkins/build.gradle’ line: 22

  • What went wrong:
    A problem occurred evaluating root project ‘cicd-pipeline-train-schedule-jenkins’.

class com.moowork.gradle.node.npm.NpmTask_Decorated cannot be cast to class java.lang.Class (com.moowork.gradle.node.npm.NpmTask_Decorated is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @9efca7e; java.lang.Class is in module java.base of loader ‘bootstrap’)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 573ms

build.gradle
--------------
plugins {
//inlude the nodeJS plugin to execute nodejs and npm tasks
id “com.moowork.node” version “1.3.1”
}

node {
download = true
version = “9.11.1”
npmVersion = “5.6.0”
}

repositories.whenObjectAdded {
if (it instanceof IvyArtifactRepository) {
metadataSources {
artifact()
}
}
}

//declare a build task
task build(type: npm_build) {

}

//declare a task to create a zip of the app
task zip(type: Zip) {
from (‘.’) {
include “*”
include “bin/"
include "data/

include “node_modules/"
include "public/

include “routes/"
include "views/

}
destinationDir(file(“dist”))
baseName “trainSchedule”
}

//declare task dependencies
build.dependsOn zip
zip.dependsOn npm_build
npm_build.dependsOn npm_test
npm_test.dependsOn npmInstall
npm_build.dependsOn npmInstall

I think you meant to use dependsOn instead of type.