Intellij can not determine node with gradle


I have an issue with my intellij 15, i can't run my project with run / debug button. I got this error bellow:

:grunt_test FAILED
Execution of grunt_test took 0.034 secs

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':grunt_test'.
> A problem occurred starting process 'command 'node''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Total time: 14.721 secs
error=2, No such file or directory
09:48:34: External task execution finished 'bootRun'.

it was working well before i upgrade my OS Yosmite to El Capitan. However when i execute "gradle bootRun" in terminal it work well.

Thank you in advance.

Comment actions Permalink

Setting environment on Mac is tricky and depends on OS version. IntelliJ IDEA environment variables are different from what you have in Terminal, hence the problem.

See the following questions:

Comment actions Permalink

The problem is specific to Gradle IDEA implementation - it uses System.getenv() to get environment, which doesn't return correct environment on Mac unless IDEA is started from terminal.
Please vote for to be notified on any progress.
For now you have to either run IDEA from terminal or use Grunt run configuration to execute Grunt tasks instead of using Gradle build

Comment actions Permalink

No, Gradle IDEA doesn't use System.getenv() to get environment, it even doesn't start the process(gradle daemon) by itself.

Gradle IDEA implementation uses Gradle Tooling API to integrate with Gradle.

Yoiu can see some details at

And feel free to vote for



Please sign in to leave a comment.