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 helpfull:
sudo launchctl config user path $PATH
"To take effect might have to restart your machine"