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 stop the gradle daemon by running
$ ./gradlew --stop
rerun the gradle command and fix it.