Reputation: 2090
I'm building a Meteor app, and experimenting with testing with Laika. I'm writing coffeescript in WebStorm 7 on Ubuntu, and trying to use WebStorm's File Watcher feature to re-execute laika
every time a coffeescript file is changed.
As context, I can run the laika --ui=bdd
command just fine in my project root, and I can even use the terminal tool in WebStorm to do the same thing. However when I set up a File Watcher, I get the following error every time:
/home/oliver/.meteor/tools/latest/bin/laika --ui=bdd -V
[laika log] accepting the following extensions: (js)
injecting laika...
loading phantomjs...
cleaning up injected code
/home/oliver/.meteor/tools/c2a0453c51/lib/node_modules/laika/lib/app.js:130
if(err) throw err;
^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
I'm not much of a node guru, and don't really even know how to debug this error, but I'm hoping someone else finds it trivial. Any ideas?
For the record, my config:
Upvotes: 0
Views: 1583
Reputation: 2090
So it turns out that despite WebStorm saying Include parent environment variables
, it was actually missing all the good stuff from its PATH
. I copy pasted my actual terminal PATH
variable in whole into the Environment variables as:
PATH=/home/oliver/.meteor/tools/latest/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
... and it worked! So there's that.
Just as an aside, if you're having similar problems with finding libraries in Laika tests, remember that your tests use Meteor, but are not execute within the Meteor environment, so whatever libraries you want to use should be npm install
ed to a node_modules
directory inside tests
. Took me a while to figure out.
Upvotes: 0