Reputation: 848
I wrote a build script for my project (maven, grunt as well as some server-reconfiguration), and when I use the WebStorm command-line with
~/Projects/javaee-angularjs$ ./launchServer.sh
Everything works as expected.
However, when I configure the file to be run by WebStorm (the green triangle top-right) it fails because of: /home/user/Projects/javaee-angularjs/launchServer.sh: line 29: grunt: command not found
The run-config should be absolutely correct: working directory is the correct one and the script is found to begin with.
Any Idea what could cause this weird behavior?
P.S. I don't know whether WebStorm can run bash natively, since I've always had the bash plugin installed.
Upvotes: 1
Views: 441
Reputation: 93858
Try starting WebStorm from terminal - does the issue persist?
When being launched from desktop/System menu, WebStorm only sees environment variables configured in ~/.profile
(login shell), but not in interactive shell configuration files (like ~/.bashhrc
). Possible workarounds:
.bashrc
to .bash_profile
).bin/webstorm.sh
/bin/bash -l -i -c "/path/to/webstorm.sh"
see also https://youtrack.jetbrains.com/issue/IDEABKL-7589
Upvotes: 4
Reputation: 548
The error sounds like Webstorm cannot find grun in its path. Try using the full path to the grunt command.
Upvotes: 2