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.
Might be usefull for someone:
In my case the problem was, that I had Android Studio running. Had to quit it first, then everything worked fine again.