ssudaraka ssudaraka - 1 year ago 100
AngularJS Question

Play Application Couldn't be Started

Recently I've been assigned for a project created with AngularJs and it uses Java Play framework to run it. I use IntelliJ-Idea IDE for the development and to run this application.

Once I clicked on "Run", it gives me following errors in the console.

'force' enabled
Will run: [gulp, --gulpfile=gulpfile.js, watch, --force] in /home/supuns/Projects/bd-business-portal/ui Cannot run program "gulp" (in directory "/home/supuns/Projects/bd-business-portal/ui"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(
Caused by: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(
at java.lang.ProcessImpl.start(
at java.lang.ProcessBuilder.start(
[trace] Stack trace suppressed: run 'last compile:run' for the full output.
[error] (compile:run) Cannot run program "gulp" (in directory "/home/supuns/Projects/bd-business-portal/ui"): error=2, No such file or directory
[error] Total time: 2 s, completed Oct 24, 2016 10:54:25 AM

Process finished with exit code 1

I can't figure out what is happening because I'm new to the environment.

Sorry about the less information I have given in my question. I have globally installed gulp but still it is not working.

Here's the content of build.sbt file.

name := """bd-business-portal"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

scalaVersion := "2.11.7"

libraryDependencies ++= Seq(

Answer Source

With the help of my team members I have found the reason that cause this issue is IntelliJ-Idea doesn't know the path to 'Gulp'. I'm using Ubuntu 16.04 and even though I have set the path globally it doesn't understand where to find gulp.

Therefore I have installed sbt and from the IntelliJ terminal ran the command:

sbt run

and it worked.


As I had to work on multiple Play framework sbt projects, doing "sbt run" on the terminal and closing IntelliJ windows to free the port was bit hectic. Therefore I decided to find the actual path variable that created this behavior and I found the PATH variable saved in /etc/environment was "/home/supuns/.nvm/versions/node/v6.9.1/bin/gulp" and I changed it to


Then the IntelliJ "Play" button worked as intended.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download