srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
867 stars 210 forks source link

com.moowork.node plugin throwing error when i try ./gradlew build #376

Closed srikanthkakumanu closed 3 years ago

srikanthkakumanu commented 3 years ago

Hi, I am getting the below error related to this plugin when i try to build node app using gradle. I am using Java 11 and remaining versions of packages as mentioned below. Please suggest the fix as i am stuck with this issue. I am using Gradle 6.8.

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

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

Error Info ------------- ./gradlew build

FAILURE: Build failed with an exception.

BUILD FAILED in 541ms

srikanthkakumanu commented 3 years ago

Error Stack Trace ------------------------ FAILURE: Build failed with an exception.

BUILD FAILED in 499ms

deepy commented 3 years ago

You'll have to downgrade your Gradle version to use this plugin as it is currently unmaintained, there's a fork (without the grunt/gulp support) and the full history is available at this issue https://github.com/srs/gradle-node-plugin/issues/315

srikanthkakumanu commented 3 years ago

Thanks for the suggestion.