Cannot run program "karma": error=2, No such file or directory when running from Eclipse Maven

1,554 views
Skip to first unread message

Jean Marois

unread,
Jul 8, 2013, 9:58:25 PM7/8/13
to karma...@googlegroups.com
Hi,

I am able to run my Jasmin tests in Karma using the karma command line and maven command line, but when trying to run maven (eg. mvn install) from within STS 3.2.0.RELEASE (Eclipse Juno 4.2) I get the following error

Failed to execute goal com.kelveden:maven-karma-plugin:1.2:start (default) on project store-webapp: There was an error executing Karma. Cannot run program "karma": error=2, No such file or directory -> [Help 1]

It's as if when Eclipse shells maven, it does not have /usr/local/bin in the path. Is there a way to configure the path eclipse uses when invoking maven?

My environment is:
Mac OSX 10.8.4
STS 3.2.0.RELEASE (Eclipse Juno 4.2)
maven-karma-plugin 1.2
karma 0.8.6 (installed globally via npm install -g karma)
Node.js 0.10.12 (installed using the OSX package)

Jean

Jean Marois

unread,
Jul 8, 2013, 11:07:35 PM7/8/13
to karma...@googlegroups.com
It appears in Mac OS X 10.8 (and possible earlier) GUI apps do not get the same path as the terminal. To add /usr/local/bin to the global, you need to edit (and possibly create) /etc/launchd.conf to include

setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

You must edit/create this file with admin privs so use sudo with vi or nano

sudo nano /etc/launchd.conf 

You will need to reboot your Mac before this change can take effect.

Vojta Jína

unread,
Jul 9, 2013, 2:19:14 AM7/9/13
to karma...@googlegroups.com
Glad you figured it out ;-)


--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages