I have MacOS with IntelliJ Idea installed. I\'m using Gradle (gradle-2.4) for building the project. I have NodeJS and NPM installed on the Mac and available from the shell.
I had a similar issue and in my case, problem was that when I ran it from IntelliJ, Gradle was unable to access path to find out where node / npm is. I was using the gradle-gulp-plugin and enabling automatic download of node resolved the problem.
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath('be.filipblondeel.gradle:gradle-gulp-plugin:0.1')
}
}
node {
// Version of node to use.
version = '0.12.0'
// Enabled the automatic download.
download = true
}